Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv18188
Modified Files:
MBitmapButton.cpp MBitmapButton.h
Log Message:
Bitmapbutton now works at least bearably on wxMSW
Index: MBitmapButton.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MBitmapButton.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- MBitmapButton.cpp 23 Dec 2003 00:41:40 -0000 1.6
+++ MBitmapButton.cpp 24 Dec 2003 07:34:10 -0000 1.7
@@ -59,7 +59,7 @@
this, 1000, image, wxDefaultPosition,
wxSize(image.GetWidth(), image.GetHeight()), 5, imgname
);
- s_main->Add(img, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 5);
+ s_main->Add(img, 0, wxALL, 5);
/**
* Dirty trick:
@@ -70,7 +70,7 @@
wxDefaultSize, wxTRANSPARENT_WINDOW
);
txt->Hide();
- s_main->Add(txt, 1, wxALL|wxADJUST_MINSIZE, 5);
+ s_main->Add(txt, 1, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 15);
SetSizer(s_main);
SetAutoLayout(true);
Index: MBitmapButton.h
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MBitmapButton.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- MBitmapButton.h 23 Dec 2003 00:41:40 -0000 1.3
+++ MBitmapButton.h 24 Dec 2003 07:34:10 -0000 1.4
@@ -40,7 +40,9 @@
#define BITMAP_Y_POS_OFFSET 0 /* Text Y positioning offset */
#define TEXT_Y_POS_OFFSET 0 /* Text Y positioning offset */
#define LABEL_POS_OFFSET -6 /* Pixels between image/button borders */
- #define BTN_FONT_SIZE 12 /* Button font size */
+ #define BTN_FONT_SIZE 12 /* Button font size */
+#elif !defined (__WXMSW__)
+ #error Need MBitmapButton constants for your port.
#endif
|