adjust start button to text size

svn path=/trunk/; revision=8667
This commit is contained in:
Martin Fuchs 2004-03-12 21:12:27 +00:00
parent a526783523
commit e40caec333
6 changed files with 41 additions and 28 deletions

View file

@ -103,7 +103,8 @@ OBJECTS = \
settings.o \
i386-stub-win32.o
LIBS = gdi32 comctl32 ole32 uuid wsock32 oleaut32
LIBS = gdi32 comctl32 ole32 uuid
DELAYIMPORTS = oleaut32 wsock32
.PHONY: all depends implib clean install dist bootcd depends
@ -128,7 +129,7 @@ buildno.h: ../../../include/reactos/buildno.h
$(CD_PREFIX)updatebuildno
$(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX)
$(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS))
$(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) $(addprefix -l,$(DELAYIMPORTS))
explorer$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico
$(RC) $(RCFLAGS) -o $@ $(PROGRAM)_intres.rc

View file

@ -72,12 +72,13 @@ OBJECTS = \
settings.o \
i386-stub-win32.o
LIBS = gdi32 comctl32 ole32 uuid wsock32 oleaut32
LIBS = gdi32 comctl32 ole32 uuid
DELAYIMPORTS = oleaut32 wsock32
all: $(TARGET)
$(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX)
$(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS))
$(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) $(addprefix -l,$(DELAYIMPORTS))
explorer$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico
windres $(RCFLAGS) -o $@ $(PROGRAM)_intres.rc

View file

@ -57,8 +57,8 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /machine:I386
# SUBTRACT LINK32 /pdb:none /force
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib delayimp.lib /nologo /subsystem:windows /machine:I386 /delayload:oleaut32.dll /delayload:wsock32.dll
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "explorer - Win32 Debug"
@ -82,8 +82,8 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# SUBTRACT LINK32 /pdb:none /force
# ADD LINK32 kernel32.lib shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib delayimp.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /delayload:oleaut32.dll /delayload:wsock32.dll
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "explorer - Win32 Debug Release"
@ -108,8 +108,8 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386
# SUBTRACT LINK32 /pdb:none /force
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib delayimp.lib /nologo /subsystem:windows /debug /machine:I386 /delayload:oleaut32.dll /delayload:wsock32.dll
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "explorer - Win32 Unicode Release"
@ -134,8 +134,8 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /machine:I386
# SUBTRACT LINK32 /pdb:none /force
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib delayimp.lib /nologo /subsystem:windows /machine:I386 /delayload:oleaut32.dll /delayload:wsock32.dll
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "explorer - Win32 Unicode Debug"
@ -160,8 +160,8 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# SUBTRACT LINK32 /pdb:none /force
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib delayimp.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /delayload:oleaut32.dll /delayload:wsock32.dll
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "explorer - Win32 _NO_COMUTIL"
@ -187,8 +187,8 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# SUBTRACT LINK32 /pdb:none /force
# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib delayimp.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /delayload:oleaut32.dll /delayload:wsock32.dll
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "explorer - Win32"
@ -214,8 +214,8 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"Win32/wexplorer.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none /force
# ADD LINK32 gdi32.lib user32.lib advapi32.lib ole32.lib delayimp.lib /nologo /subsystem:windows /debug /machine:I386 /out:"Win32/wexplorer.exe" /pdbtype:sept /delayload:oleaut32.dll
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "explorer - Win32 WineRelease"
@ -241,8 +241,8 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /incremental:no /machine:I386 /out:"WineRelease/wexplorer.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none /debug /force
# ADD LINK32 gdi32.lib user32.lib advapi32.lib ole32.lib delayimp.lib /nologo /subsystem:windows /incremental:no /machine:I386 /out:"WineRelease/wexplorer.exe" /pdbtype:sept /delayload:oleaut32.dll /delayload:wsock32.dll /delayload:wsock32.dll
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "explorer - Win32 WineDll"
@ -268,8 +268,8 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /machine:I386 /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none /debug
# ADD LINK32 gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /machine:I386 /out:"WineDll/wexplorer.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none /debug /force
# ADD LINK32 gdi32.lib user32.lib advapi32.lib ole32.lib delayimp.lib /nologo /subsystem:windows /machine:I386 /out:"WineDll/wexplorer.exe" /pdbtype:sept /delayload:oleaut32.dll /delayload:wsock32.dll
# SUBTRACT LINK32 /pdb:none
!ENDIF

View file

@ -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
@ -137,7 +145,7 @@ LRESULT DesktopBar::Init(LPCREATESTRUCT pcs)
rbBand.hwndChild = _hwndTaskBar;
rbBand.cxMinChild = 0;
rbBand.cyMinChild = ClientRect(_hwndTaskBar).bottom + 2;
rbBand.cx = 200; //pcs->cx-TASKBAR_LEFT-quicklaunch_width-(notifyarea_width+1);
rbBand.cx = 200; //pcs->cx-_taskbar_pos-quicklaunch_width-(notifyarea_width+1);
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
#endif
@ -248,13 +256,13 @@ void DesktopBar::Resize(int cx, int cy)
HDWP hdwp = BeginDeferWindowPos(3);
if (_hwndrebar)
DeferWindowPos(hdwp, _hwndrebar, 0, TASKBAR_LEFT, 0, cx-TASKBAR_LEFT-(notifyarea_width+1), cy, SWP_NOZORDER|SWP_NOACTIVATE);
DeferWindowPos(hdwp, _hwndrebar, 0, _taskbar_pos, 0, cx-_taskbar_pos-(notifyarea_width+1), cy, SWP_NOZORDER|SWP_NOACTIVATE);
else {
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);
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)

View file

@ -78,6 +78,7 @@ protected:
int WM_TASKBARCREATED;
RECT _work_area_org;
int _taskbar_pos;
LRESULT Init(LPCREATESTRUCT pcs);
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);

View file

@ -71,10 +71,12 @@ HWND TaskBar::Create(HWND hwndParent)
{
ClientRect clnt(hwndParent);
int taskbar_pos = 80; // This start position will be adjusted in DesktopBar::Resize().
return Window::Create(WINDOW_CREATOR(TaskBar), 0,
BtnWindowClass(CLASSNAME_TASKBAR), TITLE_TASKBAR,
WS_CHILD|WS_VISIBLE | CCS_TOP|CCS_NODIVIDER|CCS_NORESIZE,
TASKBAR_LEFT, 0, clnt.right-TASKBAR_LEFT-(NOTIFYAREA_WIDTH_DEF+1), clnt.bottom, hwndParent);
taskbar_pos, 0, clnt.right-taskbar_pos-(NOTIFYAREA_WIDTH_DEF+1), clnt.bottom, hwndParent);
}
LRESULT TaskBar::Init(LPCREATESTRUCT pcs)