Lay out various wxPG dialogs based on the current system screen design.
Currently, customizing some dialogs for small screen environment is done statically on the build stage by setting wxPG_SMALL_SCREEN to 1 (what is done for WXWINCE only). Instead, we can do this for all platforms in a dynamic manner, based on the classification provided by wxSystemSettings::GetScreenType() function. In order to do so there is introduced a static helper function wxPropertyGrid::IsSmallScreen() which is used to select right parameters (size, position) for several dialogs in order to display them correctly on the small screen.
This commit is contained in:
@@ -1556,6 +1556,12 @@ public:
|
||||
static wxString& CreateEscapeSequences( wxString& dst_str,
|
||||
wxString& src_str );
|
||||
|
||||
// Checks system screen design used for laying out various dialogs.
|
||||
static bool IsSmallScreen()
|
||||
{
|
||||
return wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns rectangle that fully contains properties between and including
|
||||
p1 and p2. Rectangle is in virtual scrolled window coordinates.
|
||||
|
@@ -177,14 +177,6 @@
|
||||
// Use this macro to generate standard custom image height from
|
||||
#define wxPG_STD_CUST_IMAGE_HEIGHT(LINEHEIGHT) (LINEHEIGHT-3)
|
||||
|
||||
|
||||
#if defined(__WXWINCE__)
|
||||
#define wxPG_SMALL_SCREEN 1
|
||||
#else
|
||||
#define wxPG_SMALL_SCREEN 0
|
||||
#endif
|
||||
|
||||
|
||||
// Undefine wxPG_ICON_WIDTH to use supplied xpm bitmaps instead
|
||||
// (for tree buttons)
|
||||
//#undef wxPG_ICON_WIDTH
|
||||
|
Reference in New Issue
Block a user