mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
adjust start button to text size
svn path=/branches/lean-explorer/; revision=8669
This commit is contained in:
@@ -89,7 +89,15 @@ LRESULT DesktopBar::Init(LPCREATESTRUCT pcs)
|
||||
return 1;
|
||||
|
||||
// create start button
|
||||
new PictureButton(Button(_hwnd, ResString(IDS_START), 2, 2, STARTBUTTON_WIDTH, DESKTOPBARBAR_HEIGHT-8, IDC_START, WS_VISIBLE|WS_CHILD|BS_OWNERDRAW),
|
||||
ResString start_str(IDS_START);
|
||||
WindowCanvas canvas(_hwnd);
|
||||
RECT rect = {0, 0};
|
||||
DrawText(canvas, start_str, -1, &rect, DT_SINGLELINE|DT_CALCRECT);
|
||||
int start_btn_width = rect.right+16+8;
|
||||
|
||||
_taskbar_pos = start_btn_width + 6;
|
||||
|
||||
new PictureButton(Button(_hwnd, start_str, 2, 2, start_btn_width, DESKTOPBARBAR_HEIGHT-8, IDC_START, WS_VISIBLE|WS_CHILD|BS_OWNERDRAW),
|
||||
SmallIcon(IDI_STARTMENU)/*, GetStockBrush(WHITE_BRUSH)*/);
|
||||
|
||||
// create task bar
|
||||
@@ -210,13 +218,13 @@ void DesktopBar::Resize(int cx, int cy)
|
||||
HDWP hdwp = BeginDeferWindowPos(3);
|
||||
|
||||
if (_hwndTaskBar)
|
||||
DeferWindowPos(hdwp, _hwndTaskBar, 0, TASKBAR_LEFT+quicklaunch_width, 0, cx-TASKBAR_LEFT-quicklaunch_width-(notifyarea_width+1), cy, SWP_NOZORDER|SWP_NOACTIVATE);
|
||||
DeferWindowPos(hdwp, _hwndTaskBar, 0, _taskbar_pos+quicklaunch_width, 0, cx-_taskbar_pos-quicklaunch_width-(notifyarea_width+1), cy, SWP_NOZORDER|SWP_NOACTIVATE);
|
||||
|
||||
if (_hwndNotify)
|
||||
DeferWindowPos(hdwp, _hwndNotify, 0, cx-(notifyarea_width+1), 1, notifyarea_width, cy-2, SWP_NOZORDER|SWP_NOACTIVATE);
|
||||
|
||||
if (_hwndQuickLaunch)
|
||||
DeferWindowPos(hdwp, _hwndQuickLaunch, 0, TASKBAR_LEFT, 1, quicklaunch_width, cy-2, SWP_NOZORDER|SWP_NOACTIVATE);
|
||||
DeferWindowPos(hdwp, _hwndQuickLaunch, 0, _taskbar_pos, 1, quicklaunch_width, cy-2, SWP_NOZORDER|SWP_NOACTIVATE);
|
||||
|
||||
EndDeferWindowPos(hdwp);
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ protected:
|
||||
|
||||
int WM_TASKBARCREATED;
|
||||
RECT _work_area_org;
|
||||
int _taskbar_pos;
|
||||
|
||||
LRESULT Init(LPCREATESTRUCT pcs);
|
||||
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
|
||||
|
||||
@@ -394,6 +394,8 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
#define RECENT_DOCS_COUNT 20 ///@todo read max. count of entries from registry
|
||||
|
||||
/// "Recent Files" sub-start menu
|
||||
struct RecentStartMenu : public StartMenu
|
||||
{
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
|
||||
#define IDC_FIRST_APP 0x2000
|
||||
|
||||
#define STARTBUTTON_WIDTH 60
|
||||
#define TASKBAR_LEFT 70
|
||||
//#define TASKBAR_AT_TOP
|
||||
|
||||
#define TASKBUTTONWIDTH_MIN 38
|
||||
|
||||
Reference in New Issue
Block a user