// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "fontdlgg.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
class WXDLLEXPORT wxFontPreviewer : public wxWindow
{
public:
- wxFontPreviewer(wxWindow *parent) : wxWindow(parent, wxID_ANY) {}
+ wxFontPreviewer(wxWindow *parent, const wxSize& sz = wxDefaultSize) : wxWindow(parent, wxID_ANY, wxDefaultPosition, sz)
+ {
+ }
private:
void OnPaint(wxPaintEvent& event);
{
dc.SetFont(font);
// Calculate vertical centre
- long w, h;
+ long w = 0, h = 0;
dc.GetTextExtent( wxT("X"), &w, &h);
dc.SetTextForeground(GetForegroundColour());
dc.SetClippingRegion(2, 2, size.x-4, size.y-4);
{
wxStaticText* itemStaticText15 = new wxStaticText( this, wxID_STATIC, _("C&olour:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer14->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
+
+ wxSize colourSize = wxDefaultSize;
+ if (is_pda)
+ colourSize.x = 100;
- wxChoice* itemChoice16 = new wxChoice( this, wxID_FONT_COLOUR, wxDefaultPosition, wxDefaultSize, NUM_COLS, wxColourDialogNames, 0 );
+ wxChoice* itemChoice16 = new wxChoice( this, wxID_FONT_COLOUR, wxDefaultPosition, colourSize, NUM_COLS, wxColourDialogNames, 0 );
itemChoice16->SetHelpText(_("The font colour."));
if (ShowToolTips())
itemChoice16->SetToolTip(_("The font colour."));
itemBoxSizer20->Add(itemCheckBox21, 0, wxALIGN_LEFT|wxALL, 5);
}
- itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+ if (!is_pda)
+ itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxStaticText* itemStaticText23 = new wxStaticText( this, wxID_STATIC, _("Preview:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer3->Add(itemStaticText23, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
-
+
wxFontPreviewer* itemWindow24 = new wxFontPreviewer( this );
m_previewer = itemWindow24;
itemWindow24->SetHelpText(_("Shows the font preview."));
pointSizeChoice->SetSelection(dialogFont.GetPointSize()-1);
- GetSizer()->SetItemMinSize(m_previewer, 430, 100);
+#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
+ GetSizer()->SetItemMinSize(m_previewer, is_pda ? 100 : 430, is_pda ? 40 : 100);
GetSizer()->SetSizeHints(this);
GetSizer()->Fit(this);
Centre(wxBOTH);
+#endif
delete[] families;
delete[] styles;