From 3f3cec484dc9376e6a41faa0ac668c5439cb4bd9 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 23 Aug 1999 15:23:29 +0000 Subject: [PATCH] Small optical changes for MSW Buttons now get at least 80x23 if given a default size Small compile and distrib changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/copy_src.bat | 2 ++ include/wx/msw/menu.h | 6 +++++- src/generic/dirdlgg.cpp | 17 ++++++++++++++--- src/generic/tipdlg.cpp | 4 ++++ src/msw/button.cpp | 11 +++++++++++ 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/distrib/msw/copy_src.bat b/distrib/msw/copy_src.bat index c26ad9e976..56070dcdd0 100755 --- a/distrib/msw/copy_src.bat +++ b/distrib/msw/copy_src.bat @@ -97,6 +97,8 @@ del Makefile.in \wxmsw_dist\wxMSW\src\Makefile.in cd msw md \wxmsw_dist\wxMSW\src\msw +md \wxmsw_dist\wxMSW\src\msw\ole +copy ole\*.cpp \wxmsw_dist\wxMSW\src\msw\ole copy *.cpp \wxmsw_dist\wxMSW\src\msw copy *.c \wxmsw_dist\wxMSW\src\msw copy *.def \wxmsw_dist\wxMSW\src\msw diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h index 99ce435c77..0548776b67 100644 --- a/include/wx/msw/menu.h +++ b/include/wx/msw/menu.h @@ -19,7 +19,11 @@ #include "wx/defs.h" #include "wx/event.h" #include "wx/dynarray.h" -#include "wx/msw/accel.h" +#include "wx/string.h" + +#if wxUSE_ACCEL +#include "wx/accel.h" +#endif // wxUSE_ACCEL class WXDLLEXPORT wxMenuItem; class WXDLLEXPORT wxMenuBar; diff --git a/src/generic/dirdlgg.cpp b/src/generic/dirdlgg.cpp index 8ea3fa571e..ecea39fa8f 100644 --- a/src/generic/dirdlgg.cpp +++ b/src/generic/dirdlgg.cpp @@ -173,10 +173,12 @@ wxDirCtrl::wxDirCtrl(wxWindow *parent, const wxWindowID id, const wxString &WXUN : wxTreeCtrl( parent, id, pos, size, style, wxDefaultValidator, name ) { - m_imageListNormal = new wxImageList(16, 16, TRUE); + #ifdef __WXMSW__ + m_imageListNormal = new wxImageList(16, 16, TRUE); m_imageListNormal->Add(wxICON(icon1)); m_imageListNormal->Add(wxICON(icon2)); SetImageList(m_imageListNormal); + #endif m_showHidden = FALSE; m_rootId = AddRoot( _("Sections") ); @@ -194,6 +196,10 @@ void wxDirCtrl::SetupSections() m_paths.Clear(); m_names.Clear(); +#ifdef __WXMSW__ + // better than nothing + ADD_SECTION(_T("c:\\"), _("My Harddisk") ) +#else ADD_SECTION(_T("/"), _("The Computer") ) wxGetHomeDir(&home); ADD_SECTION(home, _("My Home") ) @@ -203,6 +209,7 @@ void wxDirCtrl::SetupSections() ADD_SECTION(_T("/var"), _("Variables") ) ADD_SECTION(_T("/etc"), _("Etcetera") ) ADD_SECTION(_T("/tmp"), _("Temporary") ) +#endif } #undef ADD_SECTION @@ -215,8 +222,12 @@ void wxDirCtrl::CreateItems(const wxTreeItemId &parent) for (unsigned int i=0; im_hasSubDirs) SetItemHasChildren(id); } } diff --git a/src/generic/tipdlg.cpp b/src/generic/tipdlg.cpp index 0e61e3fb89..96a2dfbe47 100644 --- a/src/generic/tipdlg.cpp +++ b/src/generic/tipdlg.cpp @@ -175,7 +175,11 @@ wxTipDialog::wxTipDialog(wxWindow *parent, wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next")); wxStaticText *text = new wxStaticText(this, -1, _("Did you know..."), wxDefaultPosition, wxSize(-1,25) ); +#if defined(__WXMSW__) + text->SetFont(wxFont(16, wxSWISS, wxNORMAL, wxBOLD)); +#else text->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxBOLD)); +#endif // // text->SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE)); diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 9a8122e079..f9a84f98d2 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -97,6 +97,17 @@ bool wxButton::Create(wxWindow *parent, SetSize(pos.x, pos.y, size.x, size.y); + // bad hack added by Robert to make buttons at least + // 80 pixels wide. There are probably better ways... + // TODO. FIXME. + wxSize nsize( GetSize() ); + if ((nsize.x < 80) || (nsize.y < 23)) + { + if ((size.x == -1) && (nsize.x < 80)) nsize.x = 80; + if ((size.y == -1) && (nsize.y < 23)) nsize.y = 23; + SetSize( nsize ); + } + return TRUE; } -- 2.45.2