diff --git a/Application/Application.rc b/Application/Application.rc index 3f522d8e..77eb4009 100644 --- a/Application/Application.rc +++ b/Application/Application.rc @@ -28,8 +28,8 @@ LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,474 - PRODUCTVERSION 1,3,0,474 + FILEVERSION 1,3,0,477 + PRODUCTVERSION 1,3,0,477 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,12 +45,12 @@ BEGIN BLOCK "040b04b0" BEGIN VALUE "FileDescription", "Rainmeter - A Customizable Resource Meter" - VALUE "FileVersion", "1, 3, 0, 474" + VALUE "FileVersion", "1, 3, 0, 477" VALUE "InternalName", "Rainmeter" VALUE "LegalCopyright", "Copyright (C) 2010 - Rainy" VALUE "OriginalFilename", "Rainmeter.exe" VALUE "ProductName", "Rainmeter" - VALUE "ProductVersion", "1, 3, 0, 474" + VALUE "ProductVersion", "1, 3, 0, 477" END END BLOCK "VarFileInfo" diff --git a/Library/Meter.cpp b/Library/Meter.cpp index 2ba6021f..8b1faf1e 100644 --- a/Library/Meter.cpp +++ b/Library/Meter.cpp @@ -361,6 +361,7 @@ void CMeter::ReadConfig(const WCHAR* section) m_ToolTipText = parser.ReadString(section, L"ToolTipText", L"", true); m_ToolTipTitle = parser.ReadString(section, L"ToolTipTitle", L"", true); m_ToolTipIcon = parser.ReadString(section, L"ToolTipIcon", L"", true); + m_ToolTipWidth = parser.ReadInt(section, L"ToolTipWidth", 1000); m_ToolTipType = 0!=parser.ReadInt(section, L"ToolTipType", 0); m_MeasureName = parser.ReadString(section, L"MeasureName", L""); @@ -538,7 +539,7 @@ void CMeter::CreateToolTip(CMeterWindow* meterWindow) ti.rect = GetMeterRect(); SendMessage(hwndTT, TTM_ADDTOOL, NULL, (LPARAM) (LPTOOLINFO) &ti); - SendMessage(hwndTT, TTM_SETMAXTIPWIDTH, NULL, 1000); + SendMessage(hwndTT, TTM_SETMAXTIPWIDTH, NULL, m_ToolTipWidth); if (!m_ToolTipTitle.empty()) { diff --git a/Library/Meter.h b/Library/Meter.h index d563c70d..e0f50ff9 100644 --- a/Library/Meter.h +++ b/Library/Meter.h @@ -124,6 +124,7 @@ protected: std::wstring m_ToolTipText; std::wstring m_ToolTipTitle; std::wstring m_ToolTipIcon; + unsigned int m_ToolTipWidth; bool m_ToolTipType; HWND m_ToolTipHandle; diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index 62871dcd..e354ab9c 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -2349,6 +2349,10 @@ void CMeterWindow::Update(bool nodraw) j = m_Meters.begin(); for ( ; j != m_Meters.end(); ++j) { + if (!((*j)->GetToolTipHandle() != NULL) && (!(*j)->GetToolTipText().empty())) + { + (*j)->CreateToolTip(this); + } if ((*j)->GetToolTipHandle() != NULL) { (*j)->UpdateToolTip(); diff --git a/revision-number.h b/revision-number.h index 60866816..34d37525 100644 --- a/revision-number.h +++ b/revision-number.h @@ -1,2 +1,2 @@ #pragma once -const int revision_number = 474; \ No newline at end of file +const int revision_number = 477; \ No newline at end of file