Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv25657
Modified Files:
Images.cpp SBPanel.cpp SBPanel.h
Log Message:
Fixed remaining GTK2 issues.
Index: Images.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- Images.cpp 21 Dec 2003 05:01:42 -0000 1.38
+++ Images.cpp 21 Dec 2003 05:35:12 -0000 1.39
@@ -344,7 +344,7 @@
mdc.SetTextForeground(wxColour(1,1,1));
mdc.GetTextExtent(name, &x, &y);
mdc.DrawText(name, (tmp_new.GetWidth()-x)/2, 36);
-#if !defined(__WXMSW__) && !defined(__GTK2__) /* Use wxMask for transparency */
+#ifndef __WXMSW__ /* Use wxMask for transparency */
wxMask *tmp_mask;
tmp_mask = new wxMask(tmp_new, wxColour(0,0,0));
tmp_new.SetMask(tmp_mask);
@@ -370,6 +370,8 @@
int x, y; /* For storing image size */
wxMemoryDC mdc; /* Memory drawing context */
+ wxBitmap tmp(100, 100);
+ mdc.SelectObject(tmp);
#ifdef __WXMAC__
mdc.SetFont(wxFont(10, wxDEFAULT, wxNORMAL, wxNORMAL));
#else
Index: SBPanel.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/SBPanel.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- SBPanel.cpp 21 Dec 2003 03:45:35 -0000 1.7
+++ SBPanel.cpp 21 Dec 2003 05:35:12 -0000 1.8
@@ -54,11 +54,7 @@
headerbtn = new wxButton(
this, -1, title, wxDefaultPosition, wxDefaultSize, 0
);
-#if defined(__WXMSW__)
- headerbtn->SetFont(wxFont(10, wxROMAN, wxNORMAL, wxBOLD));
-#else
- headerbtn->SetFont(wxFont(12, wxROMAN, wxNORMAL, wxBOLD));
-#endif
+ headerbtn->SetFont(wxFont(SB_BTN_FONT_SIZE, wxROMAN, wxNORMAL, wxBOLD));
mainsizer->Add(headerbtn, 0, wxGROW|wxADJUST_MINSIZE, 5);
SetAutoLayout(true);
Index: SBPanel.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/SBPanel.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- SBPanel.h 6 Dec 2003 00:18:37 -0000 1.3
+++ SBPanel.h 21 Dec 2003 05:35:12 -0000 1.4
@@ -32,6 +32,12 @@
#include "defines.h"
+#if defined(__WXMSW__) || defined(__GTK2__)
+ #define SB_BTN_FONT_SIZE 10
+#else
+ #define SB_BTN_FONT_SIZE 12
+#endif
+
/**
* SBPanel, or SideBar Panel is a panel with a button on top of it
* that provides its "closing" and "opening" functionality.
|