mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Manage Skins: Tweaked menu buttons
This commit is contained in:
parent
288e68107d
commit
876fe7006a
@ -202,7 +202,7 @@ IDD_MANAGESKINS_DIALOG DIALOGEX 15, 30, 470, 260
|
||||
STYLE DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
|
||||
FONT 8, "MS Shell Dlg 2", 0, 0, 0x0
|
||||
{
|
||||
PUSHBUTTON "", IDC_MANAGESKINS_ACTIVESKINS_BUTTON, 0, 0, 145, 14, WS_TABSTOP
|
||||
PUSHBUTTON STR_ACTIVESKINS, IDC_MANAGESKINS_ACTIVESKINS_BUTTON, 0, 0, 145, 14, WS_TABSTOP
|
||||
CONTROL "", IDC_MANAGESKINS_SKINS_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_VSCROLL, 0, 18, 145, 241
|
||||
|
||||
LTEXT "N/A", IDC_MANAGESKINS_FILE_TEXT, 165, 0, 130, 14, SS_ENDELLIPSIS | SS_NOPREFIX
|
||||
@ -233,7 +233,7 @@ FONT 8, "MS Shell Dlg 2", 0, 0, 0x0
|
||||
COMBOBOX IDC_MANAGESKINS_TRANSPARENCY_COMBOBOX, 165 + NUM_LABELWIDTH, 226, 80, 14, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
|
||||
LTEXT STR_ONHOVERSC, IDC_STATIC, 165, 247, NUM_LABELWIDTH, 9
|
||||
COMBOBOX IDC_MANAGESKINS_ONHOVER_COMBOBOX, 165 + NUM_LABELWIDTH, 244, 80, 14, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | WS_DISABLED
|
||||
PUSHBUTTON "", IDC_MANAGESKINS_DISPLAYMONITOR_BUTTON, 350, 166, 118, 14, WS_DISABLED | WS_TABSTOP
|
||||
PUSHBUTTON STR_DISPLAYMONITOR, IDC_MANAGESKINS_DISPLAYMONITOR_BUTTON, 350, 166, 118, 14, WS_DISABLED | WS_TABSTOP
|
||||
AUTOCHECKBOX STR_DRAGGABLE, IDC_MANAGESKINS_DRAGGABLE_CHECKBOX, 350, 190, 118, 9, WS_DISABLED
|
||||
AUTOCHECKBOX STR_CLICKTHROUGH, IDC_MANAGESKINS_CLICKTHROUGH_CHECKBOX, 350, 203, 118, 9, WS_DISABLED
|
||||
AUTOCHECKBOX STR_KEEPONSCREEN, IDC_MANAGESKINS_KEEPONSCREEN_CHECKBOX, 350, 216, 118, 9, WS_DISABLED
|
||||
@ -308,8 +308,6 @@ STRINGTABLE
|
||||
ID_STR_SKINS, STR_SKINS
|
||||
ID_STR_THEMES, STR_THEMES
|
||||
ID_STR_SETTINGS, STR_SETTINGS
|
||||
ID_STR_ACTIVESKINS, STR_ACTIVESKINS
|
||||
ID_STR_DISPLAYMONITOR, STR_DISPLAYMONITOR
|
||||
ID_STR_STAYTOPMOST, STR_STAYTOPMOST
|
||||
ID_STR_TOPMOST, STR_TOPMOST
|
||||
ID_STR_NORMAL, STR_NORMAL
|
||||
|
@ -351,14 +351,17 @@ void CDialogManage::CTabSkins::Initialize()
|
||||
{
|
||||
m_Initialized = true;
|
||||
|
||||
std::wstring tmpSz = GetString(ID_STR_ACTIVESKINS);
|
||||
BUTTON_SPLITINFO bsi;
|
||||
bsi.mask = BCSIF_SIZE;
|
||||
bsi.size.cx = 20;
|
||||
bsi.size.cy = 14;
|
||||
|
||||
HWND item = GetDlgItem(m_Window, IDC_MANAGESKINS_ACTIVESKINS_BUTTON);
|
||||
if (CSystem::GetOSPlatform() >= OSPLATFORM_VISTA)
|
||||
{
|
||||
// Arrow down
|
||||
tmpSz += L" \x25BE";
|
||||
Button_SetStyle(item, BS_SPLITBUTTON, TRUE);
|
||||
Button_SetSplitInfo(item, &bsi);
|
||||
}
|
||||
HWND item = GetDlgItem(m_Window, IDC_MANAGESKINS_ACTIVESKINS_BUTTON);
|
||||
SetWindowText(item, tmpSz.c_str());
|
||||
|
||||
// Load folder/.ini icons from shell32
|
||||
HIMAGELIST hImageList = ImageList_Create(16, 16, ILC_COLOR32, 2, 10);
|
||||
@ -380,13 +383,11 @@ void CDialogManage::CTabSkins::Initialize()
|
||||
SetWindowPos(item, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER);
|
||||
|
||||
item = GetDlgItem(m_Window, IDC_MANAGESKINS_DISPLAYMONITOR_BUTTON);
|
||||
tmpSz = GetString(ID_STR_DISPLAYMONITOR);
|
||||
if (CSystem::GetOSPlatform() >= OSPLATFORM_VISTA)
|
||||
{
|
||||
// Arrow down
|
||||
tmpSz += L" \x25BE";
|
||||
Button_SetStyle(item, BS_SPLITBUTTON, TRUE);
|
||||
Button_SetSplitInfo(item, &bsi);
|
||||
}
|
||||
SetWindowText(item, tmpSz.c_str());
|
||||
|
||||
item = GetDlgItem(m_Window, IDC_MANAGESKINS_TRANSPARENCY_COMBOBOX);
|
||||
ComboBox_AddString(item, L"0%");
|
||||
@ -1303,6 +1304,16 @@ INT_PTR CDialogManage::CTabSkins::OnNotify(WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
break;
|
||||
|
||||
case BCN_DROPDOWN:
|
||||
{
|
||||
NMHDR* hdr = &((NMBCDROPDOWN*)lParam)->hdr;
|
||||
|
||||
// Unpush the drop-down button part and simulate click
|
||||
Button_SetDropDownState(hdr->hwndFrom, FALSE);
|
||||
SendMessage(hdr->hwndFrom, BM_CLICK, 0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user