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
This commit is contained in:
@@ -97,6 +97,8 @@ del Makefile.in \wxmsw_dist\wxMSW\src\Makefile.in
|
|||||||
|
|
||||||
cd msw
|
cd msw
|
||||||
md \wxmsw_dist\wxMSW\src\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 *.cpp \wxmsw_dist\wxMSW\src\msw
|
||||||
copy *.c \wxmsw_dist\wxMSW\src\msw
|
copy *.c \wxmsw_dist\wxMSW\src\msw
|
||||||
copy *.def \wxmsw_dist\wxMSW\src\msw
|
copy *.def \wxmsw_dist\wxMSW\src\msw
|
||||||
|
@@ -19,7 +19,11 @@
|
|||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/event.h"
|
#include "wx/event.h"
|
||||||
#include "wx/dynarray.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 wxMenuItem;
|
||||||
class WXDLLEXPORT wxMenuBar;
|
class WXDLLEXPORT wxMenuBar;
|
||||||
|
@@ -173,10 +173,12 @@ wxDirCtrl::wxDirCtrl(wxWindow *parent, const wxWindowID id, const wxString &WXUN
|
|||||||
:
|
:
|
||||||
wxTreeCtrl( parent, id, pos, size, style, wxDefaultValidator, name )
|
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(icon1));
|
||||||
m_imageListNormal->Add(wxICON(icon2));
|
m_imageListNormal->Add(wxICON(icon2));
|
||||||
SetImageList(m_imageListNormal);
|
SetImageList(m_imageListNormal);
|
||||||
|
#endif
|
||||||
|
|
||||||
m_showHidden = FALSE;
|
m_showHidden = FALSE;
|
||||||
m_rootId = AddRoot( _("Sections") );
|
m_rootId = AddRoot( _("Sections") );
|
||||||
@@ -194,6 +196,10 @@ void wxDirCtrl::SetupSections()
|
|||||||
|
|
||||||
m_paths.Clear();
|
m_paths.Clear();
|
||||||
m_names.Clear();
|
m_names.Clear();
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
// better than nothing
|
||||||
|
ADD_SECTION(_T("c:\\"), _("My Harddisk") )
|
||||||
|
#else
|
||||||
ADD_SECTION(_T("/"), _("The Computer") )
|
ADD_SECTION(_T("/"), _("The Computer") )
|
||||||
wxGetHomeDir(&home);
|
wxGetHomeDir(&home);
|
||||||
ADD_SECTION(home, _("My Home") )
|
ADD_SECTION(home, _("My Home") )
|
||||||
@@ -203,6 +209,7 @@ void wxDirCtrl::SetupSections()
|
|||||||
ADD_SECTION(_T("/var"), _("Variables") )
|
ADD_SECTION(_T("/var"), _("Variables") )
|
||||||
ADD_SECTION(_T("/etc"), _("Etcetera") )
|
ADD_SECTION(_T("/etc"), _("Etcetera") )
|
||||||
ADD_SECTION(_T("/tmp"), _("Temporary") )
|
ADD_SECTION(_T("/tmp"), _("Temporary") )
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#undef ADD_SECTION
|
#undef ADD_SECTION
|
||||||
|
|
||||||
@@ -215,8 +222,12 @@ void wxDirCtrl::CreateItems(const wxTreeItemId &parent)
|
|||||||
|
|
||||||
for (unsigned int i=0; i<m_paths.Count(); i++)
|
for (unsigned int i=0; i<m_paths.Count(); i++)
|
||||||
{
|
{
|
||||||
dir_item = new wxDirItemData(m_paths[i],m_names[i]);
|
dir_item = new wxDirItemData(m_paths[i],m_names[i]);
|
||||||
id = AppendItem( parent, m_names[i], 0, 1, dir_item);
|
#ifdef __WXMSW__
|
||||||
|
id = AppendItem( parent, m_names[i], -1, -1, dir_item);
|
||||||
|
#else
|
||||||
|
id = AppendItem( parent, m_names[i], 0, 1, dir_item);
|
||||||
|
#endif
|
||||||
if (dir_item->m_hasSubDirs) SetItemHasChildren(id);
|
if (dir_item->m_hasSubDirs) SetItemHasChildren(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -175,7 +175,11 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
|
|||||||
wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next"));
|
wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next"));
|
||||||
|
|
||||||
wxStaticText *text = new wxStaticText(this, -1, _("Did you know..."), wxDefaultPosition, wxSize(-1,25) );
|
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));
|
text->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxBOLD));
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
// text->SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE));
|
// text->SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE));
|
||||||
|
|
||||||
|
@@ -97,6 +97,17 @@ bool wxButton::Create(wxWindow *parent,
|
|||||||
|
|
||||||
SetSize(pos.x, pos.y, size.x, size.y);
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user