• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Révisioneb729acf39977af9304369b0c153e8acc0ef0315 (tree)
l'heure2016-11-23 23:52:19
AuteurDeskull <desull@user...>
CommiterDeskull

Message de Log

拡大縮小処理のためにterm_change_tile_size()を実装。 / Implementing term_change_tile_size() for scaling.

Change Summary

Modification

--- a/src/main-win.c
+++ b/src/main-win.c
@@ -1061,6 +1061,33 @@ static void term_getsize(term_data *td)
10611061 td->pos_y = rc.top;
10621062 }
10631063
1064+/*
1065+ * Change tile size with keeping window size
1066+ */
1067+static void term_change_tile_size(term_data *td)
1068+{
1069+ RECT rc;
1070+
1071+ int wid, hgt;
1072+
1073+ /* Paranoia */
1074+ if (td->cols < 1) td->cols = 1;
1075+ if (td->rows < 1) td->rows = 1;
1076+
1077+ /* Adjust */
1078+ AdjustWindowRectEx(&rc, td->dwStyle, TRUE, td->dwExStyle);
1079+
1080+ /* See CreateWindowEx */
1081+ if (!td->w) return;
1082+
1083+ /* Extract actual location */
1084+ GetWindowRect(td->w, &rc);
1085+
1086+ /* Save the location */
1087+ td->pos_x = rc.left;
1088+ td->pos_y = rc.top;
1089+}
1090+
10641091
10651092 /*
10661093 * Write the "prefs" for a single term
@@ -5939,7 +5966,7 @@ static void tile_zoom_in()
59395966 {
59405967 td->tile_hgt += 2;
59415968 td->tile_wid += 1;
5942- term_getsize(td);
5969+ term_change_tile_size(td);
59435970 term_window_resize(td);
59445971 }
59455972 }
@@ -5951,7 +5978,7 @@ static void tile_zoom_out()
59515978 {
59525979 td->tile_hgt -= 2;
59535980 td->tile_wid -= 1;
5954- term_getsize(td);
5981+ term_change_tile_size(td);
59555982 term_window_resize(td);
59565983 }
59575984 }
\ No newline at end of file