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:
Robert Roebling
1999-08-23 15:23:29 +00:00
parent 1db46618f7
commit 3f3cec484d
5 changed files with 36 additions and 4 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -173,10 +173,12 @@ wxDirCtrl::wxDirCtrl(wxWindow *parent, const wxWindowID id, const wxString &WXUN
:
wxTreeCtrl( parent, id, pos, size, style, wxDefaultValidator, name )
{
#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
@@ -216,7 +223,11 @@ void wxDirCtrl::CreateItems(const wxTreeItemId &parent)
for (unsigned int i=0; i<m_paths.Count(); i++)
{
dir_item = new wxDirItemData(m_paths[i],m_names[i]);
#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);
}
}

View File

@@ -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));

View File

@@ -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;
}