Manage Skins: Fixed that Position is not saved permanently (reset if skin is refreshed)

This commit is contained in:
Birunthan Mohanathas 2011-09-30 16:49:49 +00:00
parent 2efc79bf0c
commit 6594246bf4
3 changed files with 19 additions and 11 deletions

View File

@ -1081,7 +1081,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam)
{
m_IgnoreUpdate = true;
ZPOSITION zpos = (ZPOSITION)(ComboBox_GetCurSel((HWND)lParam) - 2);
m_SkinWindow->ChangeZPos(zpos);
m_SkinWindow->SetWindowZPosition(zpos);
}
break;

View File

@ -3612,28 +3612,23 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
else if (wParam == ID_CONTEXT_SKINMENU_VERYTOPMOST)
{
ChangeZPos(ZPOSITION_ONTOPMOST);
WriteConfig(SETTING_ALWAYSONTOP);
SetWindowZPosition(ZPOSITION_ONTOPMOST);
}
else if (wParam == ID_CONTEXT_SKINMENU_TOPMOST)
{
ChangeZPos(ZPOSITION_ONTOP);
WriteConfig(SETTING_ALWAYSONTOP);
SetWindowZPosition(ZPOSITION_ONTOP);
}
else if (wParam == ID_CONTEXT_SKINMENU_BOTTOM)
{
ChangeZPos(ZPOSITION_ONBOTTOM);
WriteConfig(SETTING_ALWAYSONTOP);
SetWindowZPosition(ZPOSITION_ONBOTTOM);
}
else if (wParam == ID_CONTEXT_SKINMENU_NORMAL)
{
ChangeZPos(ZPOSITION_NORMAL);
WriteConfig(SETTING_ALWAYSONTOP);
SetWindowZPosition(ZPOSITION_NORMAL);
}
else if (wParam == ID_CONTEXT_SKINMENU_ONDESKTOP)
{
ChangeZPos(ZPOSITION_ONDESKTOP);
WriteConfig(SETTING_ALWAYSONTOP);
SetWindowZPosition(ZPOSITION_ONDESKTOP);
}
else if (wParam == ID_CONTEXT_SKINMENU_KEEPONSCREEN)
{
@ -3867,6 +3862,18 @@ void CMeterWindow::SetWindowHide(HIDEMODE hide)
WriteConfig(SETTING_HIDEONMOUSEOVER);
}
/*
** SetWindowZPosition
**
** Helper function for setting Position
**
*/
void CMeterWindow::SetWindowZPosition(ZPOSITION zpos)
{
ChangeZPos(zpos);
WriteConfig(SETTING_ALWAYSONTOP);
}
/*
** OnSysCommand
**

View File

@ -330,6 +330,7 @@ private:
void SetSavePosition(bool b);
void SetSnapEdges(bool b);
void SetWindowHide(HIDEMODE hide);
void SetWindowZPosition(ZPOSITION zpos);
bool DoAction(int x, int y, MOUSE mouse, bool test);
bool DoMoveAction(int x, int y, MOUSE mouse);
bool ResizeWindow(bool reset);