mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2025-02-10 07:58:27 +01:00
Weather: Fixed wrong height when taskbar is vertically aligned
This commit is contained in:
parent
feaca6404d
commit
8e318943c1
@ -4099,48 +4099,51 @@ SIZE WINAPI PeopleButton_CalculateMinimumSizeHook(void* _this, SIZE* pSz)
|
|||||||
|
|
||||||
int PeopleBand_MulDivHook(int nNumber, int nNumerator, int nDenominator)
|
int PeopleBand_MulDivHook(int nNumber, int nNumerator, int nDenominator)
|
||||||
{
|
{
|
||||||
//printf("[MulDivHook] %d %d %d\n", nNumber, nNumerator, nDenominator);
|
if (nNumber != 46) // 46 = vertical taskbar, 48 = horizontal taskbar
|
||||||
AcquireSRWLockShared(&lock_epw);
|
|
||||||
if (epw)
|
|
||||||
{
|
{
|
||||||
if (bWeatherFixedSize == 1)
|
//printf("[MulDivHook] %d %d %d\n", nNumber, nNumerator, nDenominator);
|
||||||
|
AcquireSRWLockShared(&lock_epw);
|
||||||
|
if (epw)
|
||||||
{
|
{
|
||||||
int mul = 1;
|
if (bWeatherFixedSize == 1)
|
||||||
switch (dwWeatherViewMode)
|
|
||||||
{
|
|
||||||
case EP_WEATHER_VIEW_ICONTEXT:
|
|
||||||
mul = 4;
|
|
||||||
break;
|
|
||||||
case EP_WEATHER_VIEW_TEXTONLY:
|
|
||||||
mul = 3;
|
|
||||||
break;
|
|
||||||
case EP_WEATHER_VIEW_ICONTEMP:
|
|
||||||
mul = 2;
|
|
||||||
break;
|
|
||||||
case EP_WEATHER_VIEW_ICONONLY:
|
|
||||||
case EP_WEATHER_VIEW_TEMPONLY:
|
|
||||||
mul = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
ReleaseSRWLockShared(&lock_epw);
|
|
||||||
return MulDiv(nNumber * mul, nNumerator, nDenominator);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (prev_total_h)
|
|
||||||
{
|
{
|
||||||
|
int mul = 1;
|
||||||
|
switch (dwWeatherViewMode)
|
||||||
|
{
|
||||||
|
case EP_WEATHER_VIEW_ICONTEXT:
|
||||||
|
mul = 4;
|
||||||
|
break;
|
||||||
|
case EP_WEATHER_VIEW_TEXTONLY:
|
||||||
|
mul = 3;
|
||||||
|
break;
|
||||||
|
case EP_WEATHER_VIEW_ICONTEMP:
|
||||||
|
mul = 2;
|
||||||
|
break;
|
||||||
|
case EP_WEATHER_VIEW_ICONONLY:
|
||||||
|
case EP_WEATHER_VIEW_TEMPONLY:
|
||||||
|
mul = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
ReleaseSRWLockShared(&lock_epw);
|
ReleaseSRWLockShared(&lock_epw);
|
||||||
return prev_total_h;
|
return MulDiv(nNumber * mul, nNumerator, nDenominator);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
prev_total_h = MulDiv(nNumber, nNumerator, nDenominator);
|
if (prev_total_h)
|
||||||
ReleaseSRWLockShared(&lock_epw);
|
{
|
||||||
return prev_total_h;
|
ReleaseSRWLockShared(&lock_epw);
|
||||||
|
return prev_total_h;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
prev_total_h = MulDiv(nNumber, nNumerator, nDenominator);
|
||||||
|
ReleaseSRWLockShared(&lock_epw);
|
||||||
|
return prev_total_h;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ReleaseSRWLockShared(&lock_epw);
|
||||||
}
|
}
|
||||||
ReleaseSRWLockShared(&lock_epw);
|
|
||||||
return MulDiv(nNumber, nNumerator, nDenominator);
|
return MulDiv(nNumber, nNumerator, nDenominator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user