Revision: 8091 https://osdn.net/projects/ttssh2/scm/svn/commits/8091 Author: yasuhide Date: 2019-09-08 14:35:45 +0900 (Sun, 08 Sep 2019) Log Message: ----------- 半透明度ツールチップを表示する - タイトルバーでマウスホイールを動かしてウィンドウの透過度を変えたとき半透明度ツールチップを表示する - 描画時に1秒のタイマーをセットして時間経過後に半透明度ツールチップを非表示にする Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/ja/html/about/history.html trunk/installer/release/lang/English.lng trunk/installer/release/lang/French.lng trunk/installer/release/lang/German.lng trunk/installer/release/lang/Japanese.lng trunk/installer/release/lang/Korean.lng trunk/installer/release/lang/Russian.lng trunk/installer/release/lang/Simplified Chinese.lng trunk/installer/release/lang/Traditional Chinese.lng trunk/teraterm/common/tttypes.h trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/doc/en/html/about/history.html 2019-09-08 05:35:45 UTC (rev 8091) @@ -43,6 +43,7 @@ <li>Added SFMT information on version dialog.</li> <li>Changed of indication from "Protocol" to "IP version" and from "UNSPEC" to "AUTO" on <a href="../menu/file-new.html">New connection dialog</a>.</li> + <li>Showing the tooltip of the transparency value when changed the transparency value of the window by moving the mouse wheel on the title bar of the VT window.</li> </ul> </li> <li>Bug fixes Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/doc/ja/html/about/history.html 2019-09-08 05:35:45 UTC (rev 8091) @@ -43,6 +43,7 @@ <li>\x83o\x81[\x83W\x83\x87\x83\x93\x8F\xEE\x95\xF1\x83_\x83C\x83A\x83\x8D\x83O\x82\xC9SFMT\x82̕\\x8BL\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> <li><a href="../menu/file-new.html">New connection\x83_\x83C\x83A\x83\x8D\x83O</a>\x82̕\\x8BL\x82\xF0\x81uProtocol\x81v\x82\xA9\x82\xE7\x81uIP version\x81v\x82ɁA\x81uUNSPEC\x81v\x82\xF0\x81uAUTO\x81v\x82ɕύX\x82\xB5\x82\xBD\x81B</li> + <li>VT \x83E\x83B\x83\x93\x83h\x83E\x82̃^\x83C\x83g\x83\x8B\x83o\x81[\x8F\xE3\x82Ń}\x83E\x83X\x83z\x83C\x81[\x83\x8B\x82𑀍삵\x82ăE\x83B\x83\x93\x83h\x83E\x82̓\xA7\x89ߒl\x82\xF0\x88ꎞ\x93I\x82ɕύX\x82\xB7\x82\xE9\x82ƁA\x93\xA7\x89ߒl\x82\xF0\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li> </ul> </li> <li>\x83o\x83O\x8FC\x90\xB3 Modified: trunk/installer/release/lang/English.lng =================================================================== --- trunk/installer/release/lang/English.lng 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/installer/release/lang/English.lng 2019-09-08 05:35:45 UTC (rev 8091) @@ -311,6 +311,8 @@ DLG_DANDD_DONTSHOW_NEEXTDROP=Do not d&isplay this dialog, next drop DLG_DANDD_NOTE=Drop with CTRL, this dialog is displayed +TOOLTIP_TITLEBAR_TRANSPARENCY=Transparency %d + ; commonlib.c MSG_WINSOCK_ERROR=Cannot use winsock MSG_INVALID_HOST_ERROR=Invalid host Modified: trunk/installer/release/lang/French.lng =================================================================== --- trunk/installer/release/lang/French.lng 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/installer/release/lang/French.lng 2019-09-08 05:35:45 UTC (rev 8091) @@ -312,6 +312,8 @@ DLG_DANDD_DONTSHOW_NEEXTDROP=Do not d&isplay this dialog, next drop DLG_DANDD_NOTE=Drop with CTRL, this dialog is displayed +TOOLTIP_TITLEBAR_TRANSPARENCY=Transparence %d + ; commonlib.c MSG_WINSOCK_ERROR=Impossible d'utiliser winsock MSG_INVALID_HOST_ERROR=H\xF4te invalide Modified: trunk/installer/release/lang/German.lng =================================================================== --- trunk/installer/release/lang/German.lng 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/installer/release/lang/German.lng 2019-09-08 05:35:45 UTC (rev 8091) @@ -312,6 +312,8 @@ DLG_DANDD_DONTSHOW_NEEXTDROP=Do not d&isplay this dialog, next drop DLG_DANDD_NOTE=Drop with CTRL, this dialog is displayed +TOOLTIP_TITLEBAR_TRANSPARENCY=Transparenz %d + ; commonlib.c MSG_WINSOCK_ERROR=Kann Winsock nicht verwenden MSG_INVALID_HOST_ERROR=Falscher Hostname Modified: trunk/installer/release/lang/Japanese.lng =================================================================== --- trunk/installer/release/lang/Japanese.lng 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/installer/release/lang/Japanese.lng 2019-09-08 05:35:45 UTC (rev 8091) @@ -311,6 +311,8 @@ DLG_DANDD_DONTSHOW_NEEXTDROP=\x8E\x9F\x82̃h\x83\x8D\x83b\x83v\x8E\x9E\x81A\x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x95\\x8E\xA6\x82\xB5\x82Ȃ\xA2(&I) DLG_DANDD_NOTE=\x82\xB1\x82̃_\x83C\x83A\x83\x8D\x83O\x82́ACTRL\x82\xF0\x89\x9F\x82\xB5\x82Ȃ\xAA\x82\xE7\x83h\x83\x8D\x83b\x83v\x82\xB7\x82\xE9\x82ƕK\x82\xB8\x95\\x8E\xA6\x82\xB3\x82\xEA\x82܂\xB7 +TOOLTIP_TITLEBAR_TRANSPARENCY=\x94\xBC\x93\xA7\x96\xBE\x93x %d + ; commonlib.c MSG_WINSOCK_ERROR=Winsock \x82\xAA\x8Eg\x82\xA6\x82܂\xB9\x82\xF1 MSG_INVALID_HOST_ERROR=\x96\xB3\x8C\xF8\x82ȃz\x83X\x83g Modified: trunk/installer/release/lang/Korean.lng =================================================================== --- trunk/installer/release/lang/Korean.lng 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/installer/release/lang/Korean.lng 2019-09-08 05:35:45 UTC (rev 8091) @@ -312,6 +312,8 @@ DLG_DANDD_DONTSHOW_NEEXTDROP=Do not d&isplay this dialog, next drop DLG_DANDD_NOTE=Drop with CTRL, this dialog is displayed +TOOLTIP_TITLEBAR_TRANSPARENCY=\xC5\xF5\xB8\x{DD75} %d + ; commonlib.c MSG_WINSOCK_ERROR=\xC0\xA9\xBC\xD3\xC0\xBB \xBB\xE7\xBF\xEB\xC7\xD2 \xBC\xF6 \xBE\xF8\xBD\xC0\xB4ϴ\xD9 MSG_INVALID_HOST_ERROR=\xC0߸\xF8\xB5\xC8 ȣ\xBD\xBAƮ Modified: trunk/installer/release/lang/Russian.lng =================================================================== --- trunk/installer/release/lang/Russian.lng 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/installer/release/lang/Russian.lng 2019-09-08 05:35:45 UTC (rev 8091) @@ -312,6 +312,8 @@ DLG_DANDD_DONTSHOW_NEEXTDROP=Do not d&isplay this dialog, next drop DLG_DANDD_NOTE=Drop with CTRL, this dialog is displayed +TOOLTIP_TITLEBAR_TRANSPARENCY=\xEF\xF0\xEE\xE7\xF0\xE0\xF7\xED\xEE\xF1\xF2\xFC %d + ; commonlib.c MSG_WINSOCK_ERROR=\xCD\xE5 \xF3\xE4\xE0\xE5\xF2\xF1\xFF \xE8\xF1\xEF\xEE\xEB\xFC\xE7\xEE\xE2\xE0\xF2\xFC winsock MSG_INVALID_HOST_ERROR=\xCD\xE5\xE2\xE5\xF0\xED\xFB\xE9 \xF5\xEE\xF1\xF2 Modified: trunk/installer/release/lang/Simplified Chinese.lng =================================================================== --- trunk/installer/release/lang/Simplified Chinese.lng 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/installer/release/lang/Simplified Chinese.lng 2019-09-08 05:35:45 UTC (rev 8091) @@ -312,6 +312,8 @@ DLG_DANDD_DONTSHOW_NEEXTDROP=Do not d&isplay this dialog, next drop DLG_DANDD_NOTE=Drop with CTRL, this dialog is displayed +TOOLTIP_TITLEBAR_TRANSPARENCY=\xC3\xF7\xB6\xC8 %d + ; commonlib.c MSG_WINSOCK_ERROR=\xCE\xA8ʹ\xD3\xC3 Winsock MSG_INVALID_HOST_ERROR=\xCE\xDEЧ\xB5\xC4\xD6\xF7\xBB\xFA\xB5\xD8ַ Modified: trunk/installer/release/lang/Traditional Chinese.lng =================================================================== --- trunk/installer/release/lang/Traditional Chinese.lng 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/installer/release/lang/Traditional Chinese.lng 2019-09-08 05:35:45 UTC (rev 8091) @@ -312,6 +312,8 @@ DLG_DANDD_DONTSHOW_NEEXTDROP=Do not d&isplay this dialog, next drop DLG_DANDD_NOTE=Drop with CTRL, this dialog is displayed +TOOLTIP_TITLEBAR_TRANSPARENCY=\xB3z\xA9\xFA\xAB\xD7 %d + ; commonlib.c MSG_WINSOCK_ERROR=\xB5L\xAAk\xA8ϥ\xCE Winsock MSG_INVALID_HOST_ERROR=\xB5L\xAEĪ\xBA\xA5D\xBE\xF7\xA6a\xA7} Modified: trunk/teraterm/common/tttypes.h =================================================================== --- trunk/teraterm/common/tttypes.h 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/teraterm/common/tttypes.h 2019-09-08 05:35:45 UTC (rev 8091) @@ -45,6 +45,7 @@ #define IdPrnProcTimer 9 #define IdCancelConnectTimer 10 // add (2007.1.10 yutaka) #define IdPasteDelayTimer 11 +#define IdTransparencyTipTimer 12 // add (2019.9.7 yasuhide) /* Window Id */ #define IdVT 1 Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2019-09-08 05:23:38 UTC (rev 8090) +++ trunk/teraterm/teraterm/vtwin.cpp 2019-09-08 05:35:45 UTC (rev 8091) @@ -85,6 +85,7 @@ #include "tekwin.h" #include <htmlhelp.h> #include "compat_win.h" +#include "TipWin.h" #include "initguid.h" //#include "Usbiodef.h" @@ -140,6 +141,10 @@ static int AutoDisconnectedPort = -1; +static TipWin *TransparencyTip; +static int TransparencyTipPtsX = 0; +static int TransparencyTipPtsY = 0; + #ifndef WM_IME_COMPOSITION #define WM_IME_COMPOSITION 0x010F #endif @@ -172,6 +177,13 @@ } } +static void DestroyTransparencyTip(void) { + if (TransparencyTip) { + TipWinDestroy(TransparencyTip); + TransparencyTip = NULL; + } +} + /** * @param[in] alpha 0-255 */ @@ -2436,6 +2448,9 @@ if (InTitleBar) { int delta = zDelta < 0 ? -1 : 1; int newAlpha = Alpha; + TCHAR tipbuf[32]; + TCHAR uimsg[MAX_UIMSG]; + newAlpha += delta * ts.MouseWheelScrollLine; if (newAlpha > 255) newAlpha = 255; @@ -2442,6 +2457,24 @@ else if (newAlpha < 0) newAlpha = 0; SetWindowAlpha(newAlpha); + + get_lang_msg("TOOLTIP_TITLEBAR_TRANSPARENCY", uimsg, sizeof(uimsg), "Transparency %d", ts.UILanguageFile); + _stprintf_s(tipbuf, _countof(tipbuf), _T(uimsg), newAlpha); + ::SetTimer(HVTWin, IdTransparencyTipTimer, 1000, NULL); + + if (TransparencyTipPtsX != pt.x || + TransparencyTipPtsY != pt.y) { + DestroyTransparencyTip(); + } + + if (TransparencyTip == NULL) { + TransparencyTip = TipWinCreate(HVTWin, pt.x, pt.y, tipbuf, TRUE); + TransparencyTipPtsX = pt.x; + TransparencyTipPtsY = pt.y; + } else { + TipWinSetText(TransparencyTip, tipbuf); + } + return TRUE; } } @@ -2903,6 +2936,9 @@ case IdPrnProcTimer: PrnFileDirectProc(); break; + case IdTransparencyTipTimer: + DestroyTransparencyTip(); + break; } }