• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision8115 (tree)
Zeit2019-09-12 00:19:26
Autoryasuhide

Log Message

不透明度ツールチップのDestroyを関数化した

Ändern Zusammenfassung

Diff

--- trunk/teraterm/teraterm/vtwin.cpp (revision 8114)
+++ trunk/teraterm/teraterm/vtwin.cpp (revision 8115)
@@ -142,8 +142,7 @@
142142 static int AutoDisconnectedPort = -1;
143143
144144 static TipWin *OpacityTip;
145-static int OpacityTipPtsX = 0;
146-static int OpacityTipPtsY = 0;
145+static POINT OpacityTipPts;
147146
148147 #ifndef WM_IME_COMPOSITION
149148 #define WM_IME_COMPOSITION 0x010F
@@ -177,10 +176,10 @@
177176 }
178177 }
179178
180-static void DestroyOpacityTip(void) {
181- if (OpacityTip) {
182- TipWinDestroy(OpacityTip);
183- OpacityTip = NULL;
179+static void DestroyTooltip(TipWin* *tooltip) {
180+ if (*tooltip) {
181+ TipWinDestroy(*tooltip);
182+ (*tooltip) = NULL;
184183 }
185184 }
186185
@@ -2458,21 +2457,23 @@
24582457 newAlpha = 0;
24592458 SetWindowAlpha(newAlpha);
24602459
2461- get_lang_msg("TOOLTIP_TITLEBAR_OPACITY", uimsg, sizeof(uimsg), "Opacity %.0f %%", ts.UILanguageFile);
2460+ get_lang_msg("TOOLTIP_TITLEBAR_OPACITY", uimsg, sizeof(uimsg), "Opacity %.1f %%", ts.UILanguageFile);
24622461 _stprintf_s(tipbuf, _countof(tipbuf), _T(uimsg), (newAlpha / 255.0) * 100);
24632462 ::SetTimer(HVTWin, IdOpacityTipTimer, 1000, NULL);
24642463
2465- if (OpacityTipPtsX != pt.x ||
2466- OpacityTipPtsY != pt.y) {
2467- DestroyOpacityTip();
2464+ if (OpacityTipPts.x != pt.x ||
2465+ OpacityTipPts.y != pt.y) {
2466+ DestroyTooltip(&OpacityTip);
24682467 }
24692468
24702469 if (OpacityTip == NULL) {
24712470 OpacityTip = TipWinCreate(HVTWin, pt.x, pt.y, tipbuf);
2472- OpacityTipPtsX = pt.x;
2473- OpacityTipPtsY = pt.y;
2471+ OpacityTipPts.x = pt.x;
2472+ OpacityTipPts.y = pt.y;
24742473 } else {
24752474 TipWinSetText(OpacityTip, tipbuf);
2475+ // ツールチップのリサイズが失敗したように見える問題の暫定対策
2476+ TipWinSetText(OpacityTip, tipbuf);
24762477 }
24772478
24782479 return TRUE;
@@ -2937,7 +2938,7 @@
29372938 PrnFileDirectProc();
29382939 break;
29392940 case IdOpacityTipTimer:
2940- DestroyOpacityTip();
2941+ DestroyTooltip(&OpacityTip);
29412942 break;
29422943 }
29432944 }
Show on old repository browser