From e4606ed9d0d0fb3c6b11e97185a66139ff703c35 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 10 Jul 2001 15:07:52 +0000 Subject: [PATCH] wxComboBox appearance fixes, looks fine now but doesn't really work under GTK yet git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/univ/renderer.h | 5 +- samples/widgets/icons/bmpbtn.xpm | 74 ++++++++++---------- samples/widgets/icons/button.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/checkbox.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/combobox.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/gauge.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/listbox.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/notebook.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/radiobox.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/scrolbar.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/slider.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/statbox.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/stattext.xpm | 108 ++++++++++++++--------------- samples/widgets/icons/text.xpm | 108 ++++++++++++++--------------- src/common/popupcmn.cpp | 7 ++ src/gtk/window.cpp | 6 +- src/gtk1/window.cpp | 6 +- src/univ/button.cpp | 6 +- src/univ/combobox.cpp | 31 ++++++--- src/univ/themes/gtk.cpp | 81 +++++++++++++++------- 20 files changed, 781 insertions(+), 731 deletions(-) diff --git a/include/wx/univ/renderer.h b/include/wx/univ/renderer.h index 3304d277ea..5af129e218 100644 --- a/include/wx/univ/renderer.h +++ b/include/wx/univ/renderer.h @@ -250,6 +250,7 @@ public: // return the bitmaps to use for combobox button virtual void GetComboBitmaps(wxBitmap *bmpNormal, + wxBitmap *bmpFocus, wxBitmap *bmpPressed, wxBitmap *bmpDisabled) = 0; @@ -572,9 +573,11 @@ public: { m_renderer->DrawMenuSeparator(dc, y, geomInfo); } #endif virtual void GetComboBitmaps(wxBitmap *bmpNormal, + wxBitmap *bmpFocus, wxBitmap *bmpPressed, wxBitmap *bmpDisabled) - { m_renderer->GetComboBitmaps(bmpNormal, bmpPressed, bmpDisabled); } + { m_renderer->GetComboBitmaps(bmpNormal, bmpFocus, + bmpPressed, bmpDisabled); } virtual void AdjustSize(wxSize *size, const wxWindow *window) { m_renderer->AdjustSize(size, window); } diff --git a/samples/widgets/icons/bmpbtn.xpm b/samples/widgets/icons/bmpbtn.xpm index 5fa2aa593f..9310e842b0 100644 --- a/samples/widgets/icons/bmpbtn.xpm +++ b/samples/widgets/icons/bmpbtn.xpm @@ -1,37 +1,37 @@ -/* XPM */ -static char *magick[] = { -/* columns rows colors chars-per-pixel */ -"16 15 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #808080", -"$ c #c0c0c0", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -" ", -" $$$$$$$$$$$$$$ ", -" $$$# #$$$# #$ ", -" $$$ $ $$$ $$ $ ", -" $# $ $$$ $$ $ ", -" $ $ $ $# #$ ", -" $ $ $ $ $$$$$ ", -" $# $$ $ $$$$$ ", -" $ $ ", -" $$$ $$ $$$$$$$ ", -" $$$ $ $$ $ $ ", -" $$$ $ $ $$ $$$ ", -" $$ $ $$$ ", -" $ $$$$$$$$$ ", -" " -}; +/* XPM */ +static char *magick[] = { +/* columns rows colors chars-per-pixel */ +"16 15 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c #808080", +"$ c none", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +" ", +" $$$$$$$$$$$$$$ ", +" $$$# #$$$# #$ ", +" $$$ $ $$$ $$ $ ", +" $# $ $$$ $$ $ ", +" $ $ $ $# #$ ", +" $ $ $ $ $$$$$ ", +" $# $$ $ $$$$$ ", +" $ $ ", +" $$$ $$ $$$$$$$ ", +" $$$ $ $$ $ $ ", +" $$$ $ $ $$ $$$ ", +" $$ $ $$$ ", +" $ $$$$$$$$$ ", +" " +}; diff --git a/samples/widgets/icons/button.xpm b/samples/widgets/icons/button.xpm index d06b3a3ed1..69fb0f1846 100644 --- a/samples/widgets/icons/button.xpm +++ b/samples/widgets/icons/button.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *button_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"##### #####", -"#### :::::::::::::::::::::: ####", -"### :::::::::::::::::::::::$ ###", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"## ::######################$$ ##", -"### $$$$$$$$$$$$$$$$$$$$$$$$ ###", -"#### $$$$$$$$$$$$$$$$$$$$$$ ####", -"##### #####", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *button_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"##### #####", +"#### :::::::::::::::::::::: ####", +"### :::::::::::::::::::::::$ ###", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"## ::######################$$ ##", +"### $$$$$$$$$$$$$$$$$$$$$$$$ ###", +"#### $$$$$$$$$$$$$$$$$$$$$$ ####", +"##### #####", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/checkbox.xpm b/samples/widgets/icons/checkbox.xpm index 375cfddabb..b6bd9ecbf5 100644 --- a/samples/widgets/icons/checkbox.xpm +++ b/samples/widgets/icons/checkbox.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *checkbox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"#####$$$$$$$$$$$$$$$$$$$$$$#####", -"####$ #:####", -"####$ ::::::::::::::::::::#:####", -"####$ ::::::::::::::::::::#:####", -"####$ ::::::::::::::::::::#:####", -"####$ ::: :::::::::: :::#:####", -"####$ ::: :::::::: :::#:####", -"####$ :::: :::::: ::::#:####", -"####$ ::::: :::: :::::#:####", -"####$ :::::: :: ::::::#:####", -"####$ ::::::: :::::::#:####", -"####$ :::::::: ::::::::#:####", -"####$ :::::::: ::::::::#:####", -"####$ ::::::: :::::::#:####", -"####$ :::::: :: ::::::#:####", -"####$ ::::: :::: :::::#:####", -"####$ :::: :::::: ::::#:####", -"####$ ::: :::::::: :::#:####", -"####$ ::: :::::::::: :::#:####", -"####$ ::::::::::::::::::::#:####", -"####$ ::::::::::::::::::::#:####", -"####$ ::::::::::::::::::::#:####", -"####$ #####################:####", -"#####::::::::::::::::::::::#####", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *checkbox_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"#####$$$$$$$$$$$$$$$$$$$$$$#####", +"####$ #:####", +"####$ ::::::::::::::::::::#:####", +"####$ ::::::::::::::::::::#:####", +"####$ ::::::::::::::::::::#:####", +"####$ ::: :::::::::: :::#:####", +"####$ ::: :::::::: :::#:####", +"####$ :::: :::::: ::::#:####", +"####$ ::::: :::: :::::#:####", +"####$ :::::: :: ::::::#:####", +"####$ ::::::: :::::::#:####", +"####$ :::::::: ::::::::#:####", +"####$ :::::::: ::::::::#:####", +"####$ ::::::: :::::::#:####", +"####$ :::::: :: ::::::#:####", +"####$ ::::: :::: :::::#:####", +"####$ :::: :::::: ::::#:####", +"####$ ::: :::::::: :::#:####", +"####$ ::: :::::::::: :::#:####", +"####$ ::::::::::::::::::::#:####", +"####$ ::::::::::::::::::::#:####", +"####$ ::::::::::::::::::::#:####", +"####$ #####################:####", +"#####::::::::::::::::::::::#####", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/combobox.xpm b/samples/widgets/icons/combobox.xpm index c19dba9745..9bca423db5 100644 --- a/samples/widgets/icons/combobox.xpm +++ b/samples/widgets/icons/combobox.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *combobox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"## ##", -"## ################ ##", -"## ################ ##### ##", -"## ################ ### ##", -"## ################ # ##", -"## ################ ##", -"## ##", -"#### ############## ######### ##", -"#### ############## ######### ##", -"#### ############## #### #### ##", -"#### ############## ### ### ##", -"#### ## ##### ## ## ##", -"#### ############## ######### ##", -"#### ## #### ######### ##", -"#### ############## ######### ##", -"#### ## ### ##", -"#### ############## ######### ##", -"#### ## #### ######### ##", -"#### ############## ######### ##", -"#### ## ##### ## ## ##", -"#### ############## ### ### ##", -"#### ## #### #### #### ##", -"#### ############## ######### ##", -"#### ############## ######### ##", -"#### ############## ######### ##", -"#### ##", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *combobox_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"## ##", +"## ################ ##", +"## ################ ##### ##", +"## ################ ### ##", +"## ################ # ##", +"## ################ ##", +"## ##", +"#### ############## ######### ##", +"#### ############## ######### ##", +"#### ############## #### #### ##", +"#### ############## ### ### ##", +"#### ## ##### ## ## ##", +"#### ############## ######### ##", +"#### ## #### ######### ##", +"#### ############## ######### ##", +"#### ## ### ##", +"#### ############## ######### ##", +"#### ## #### ######### ##", +"#### ############## ######### ##", +"#### ## ##### ## ## ##", +"#### ############## ### ### ##", +"#### ## #### #### #### ##", +"#### ############## ######### ##", +"#### ############## ######### ##", +"#### ############## ######### ##", +"#### ##", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/gauge.xpm b/samples/widgets/icons/gauge.xpm index 0a3606ba96..0439a7a008 100644 --- a/samples/widgets/icons/gauge.xpm +++ b/samples/widgets/icons/gauge.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *gauge_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"## ##", -"## $$$$$$$$$$$$$$$$$::::::::: ##", -"## $$$$$$$$$$$$$$$$$::::::::: ##", -"## $$$$$$$$$$$$$$$$$::::::::: ##", -"## $$$$ $$$$$ $$$$$ :::: :::: ##", -"## $$$$ $$$$$ $$$$$ :::: :::: ##", -"## $$$$ $$$$$ $$$$$ :::: :::: ##", -"## $$$$ $$$$$ $$$$$ :::: :::: ##", -"## $$$$ $$$$$ $$$$$ :::: :::: ##", -"## $$$$ $$$$$ $$$$$ :::: :::: ##", -"## $$$$ $$$$$ $$$$$ :::: :::: ##", -"## $$$$ $$$$$ $$$$$ :::: :::: ##", -"## $$$$$$$$$$$$$$$$$::::::::: ##", -"## $$$$$$$$$$$$$$$$$::::::::: ##", -"## $$$$$$$$$$$$$$$$$::::::::: ##", -"## ##", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *gauge_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"## ##", +"## $$$$$$$$$$$$$$$$$::::::::: ##", +"## $$$$$$$$$$$$$$$$$::::::::: ##", +"## $$$$$$$$$$$$$$$$$::::::::: ##", +"## $$$$ $$$$$ $$$$$ :::: :::: ##", +"## $$$$ $$$$$ $$$$$ :::: :::: ##", +"## $$$$ $$$$$ $$$$$ :::: :::: ##", +"## $$$$ $$$$$ $$$$$ :::: :::: ##", +"## $$$$ $$$$$ $$$$$ :::: :::: ##", +"## $$$$ $$$$$ $$$$$ :::: :::: ##", +"## $$$$ $$$$$ $$$$$ :::: :::: ##", +"## $$$$ $$$$$ $$$$$ :::: :::: ##", +"## $$$$$$$$$$$$$$$$$::::::::: ##", +"## $$$$$$$$$$$$$$$$$::::::::: ##", +"## $$$$$$$$$$$$$$$$$::::::::: ##", +"## ##", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/listbox.xpm b/samples/widgets/icons/listbox.xpm index a0fe573dc5..58eb588f77 100644 --- a/samples/widgets/icons/listbox.xpm +++ b/samples/widgets/icons/listbox.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *listbox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"### ###", -"### ############## ######### ###", -"### ############## ######### ###", -"### ############## #### #### ###", -"### ############## ### ### ###", -"### ## ##### ## ## ###", -"### ############## ######### ###", -"### ## #### ######### ###", -"### ############## ######### ###", -"### ## ### ###", -"### ############## ######### ###", -"### ## #### ######### ###", -"### ############## ######### ###", -"### ## ##### ## ## ###", -"### ############## ### ### ###", -"### ## #### #### #### ###", -"### ############## ######### ###", -"### ############## ######### ###", -"### ############## ######### ###", -"### ###", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *listbox_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"### ###", +"### ############## ######### ###", +"### ############## ######### ###", +"### ############## #### #### ###", +"### ############## ### ### ###", +"### ## ##### ## ## ###", +"### ############## ######### ###", +"### ## #### ######### ###", +"### ############## ######### ###", +"### ## ### ###", +"### ############## ######### ###", +"### ## #### ######### ###", +"### ############## ######### ###", +"### ## ##### ## ## ###", +"### ############## ### ### ###", +"### ## #### #### #### ###", +"### ############## ######### ###", +"### ############## ######### ###", +"### ############## ######### ###", +"### ###", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/notebook.xpm b/samples/widgets/icons/notebook.xpm index 411ea74cab..2be2c47432 100644 --- a/samples/widgets/icons/notebook.xpm +++ b/samples/widgets/icons/notebook.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *notebook_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"################################", -"### # # ###", -"## :::::::$ :::::::$ :::::::$ ##", -"## :######$ :######$ :######$ ##", -"## :######$ :######$ :######$ ##", -"## :######$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## :########################$ ##", -"## $$$$$$$$$$$$$$$$$$$$$$$$$$ ##", -"## ##", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *notebook_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"################################", +"### # # ###", +"## :::::::$ :::::::$ :::::::$ ##", +"## :######$ :######$ :######$ ##", +"## :######$ :######$ :######$ ##", +"## :######$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## :########################$ ##", +"## $$$$$$$$$$$$$$$$$$$$$$$$$$ ##", +"## ##", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/radiobox.xpm b/samples/widgets/icons/radiobox.xpm index 5c1540dd64..e0d75d7fbd 100644 --- a/samples/widgets/icons/radiobox.xpm +++ b/samples/widgets/icons/radiobox.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *radio_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"###########$$$$$$$$$#:##########", -"#########$$$ $$#:#########", -"########$$ $:::::: $::########", -"#######$$ :::::::::::#$::#######", -"######$$ :::::::::::::#$::######", -"#####$$ :::::::::::::::#$::#####", -"####$$ ::::::#####::::::#$:#####", -"####$ $:::::$ $#:::::$#:####", -"###$$ :::::$ $#::::$#:####", -"###$ :::::$ $:::::$:####", -"###$ ::::: #::::$:####", -"###$ ::::: #::::$:####", -"###$ ::::: #::::$:####", -"###$ ::::: #::::$:####", -"###$ ::::: #::::$:####", -"###$ :::::$ $:::::$:####", -"###$$ :::::$ $#::::$#:####", -"####$ ::::::$ $#:::::$#:####", -"####$$#::::::#####::::::$#:#####", -"####:$$#:::::::::::::::$#:######", -"#####:$$$:::::::::::::$#:#######", -"######:$$$:::::::::::$#:########", -"#######::$$$::::::$$$::#########", -"#########:$$$$$$$$$::###########", -"###########::::::::#############", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *radio_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"###########$$$$$$$$$#:##########", +"#########$$$ $$#:#########", +"########$$ $:::::: $::########", +"#######$$ :::::::::::#$::#######", +"######$$ :::::::::::::#$::######", +"#####$$ :::::::::::::::#$::#####", +"####$$ ::::::#####::::::#$:#####", +"####$ $:::::$ $#:::::$#:####", +"###$$ :::::$ $#::::$#:####", +"###$ :::::$ $:::::$:####", +"###$ ::::: #::::$:####", +"###$ ::::: #::::$:####", +"###$ ::::: #::::$:####", +"###$ ::::: #::::$:####", +"###$ ::::: #::::$:####", +"###$ :::::$ $:::::$:####", +"###$$ :::::$ $#::::$#:####", +"####$ ::::::$ $#:::::$#:####", +"####$$#::::::#####::::::$#:#####", +"####:$$#:::::::::::::::$#:######", +"#####:$$$:::::::::::::$#:#######", +"######:$$$:::::::::::$#:########", +"#######::$$$::::::$$$::#########", +"#########:$$$$$$$$$::###########", +"###########::::::::#############", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/scrolbar.xpm b/samples/widgets/icons/scrolbar.xpm index 417940512e..82753672a4 100644 --- a/samples/widgets/icons/scrolbar.xpm +++ b/samples/widgets/icons/scrolbar.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *magick[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"## ###", -"## ############ ############ ###", -"## ############ ############ ###", -"## ############ ############ ###", -"## ####### #### #### ####### ###", -"## ###### #### #### ###### ###", -"## ##### #### #### ##### ###", -"## #### #### #### #### ###", -"## ### #### #### ### ###", -"## #### #### #### #### ###", -"## ##### #### #### ##### ###", -"## ###### #### #### ###### ###", -"## ####### #### #### ####### ###", -"## ############ ############ ###", -"## ############ ############ ###", -"## ############ ############ ###", -"## ###", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *magick[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"## ###", +"## ############ ############ ###", +"## ############ ############ ###", +"## ############ ############ ###", +"## ####### #### #### ####### ###", +"## ###### #### #### ###### ###", +"## ##### #### #### ##### ###", +"## #### #### #### #### ###", +"## ### #### #### ### ###", +"## #### #### #### #### ###", +"## ##### #### #### ##### ###", +"## ###### #### #### ###### ###", +"## ####### #### #### ####### ###", +"## ############ ############ ###", +"## ############ ############ ###", +"## ############ ############ ###", +"## ###", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/slider.xpm b/samples/widgets/icons/slider.xpm index 05f91810dd..aa30307164 100644 --- a/samples/widgets/icons/slider.xpm +++ b/samples/widgets/icons/slider.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *slider_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"####### ###################", -"###### :::::$ ##################", -"###### :####$ ##################", -"###### :####$ ##################", -"###### :####$ ##################", -"###### :####$ ##################", -"###### :####$ ##################", -"## :####$ ##", -"## $$$ :####$ $$$$$$$$$$$$$$$ ##", -"## ### :####$ ############### ##", -"## ### :####$ ############### ##", -"## ### :####$ ############### ##", -"###### :####$ ##################", -"###### :####$ ##################", -"###### :$$$$$ ##################", -"####### ###################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *slider_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"####### ###################", +"###### :::::$ ##################", +"###### :####$ ##################", +"###### :####$ ##################", +"###### :####$ ##################", +"###### :####$ ##################", +"###### :####$ ##################", +"## :####$ ##", +"## $$$ :####$ $$$$$$$$$$$$$$$ ##", +"## ### :####$ ############### ##", +"## ### :####$ ############### ##", +"## ### :####$ ############### ##", +"###### :####$ ##################", +"###### :####$ ##################", +"###### :$$$$$ ##################", +"####### ###################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/statbox.xpm b/samples/widgets/icons/statbox.xpm index 6440f5ded1..5e7ef5aadc 100644 --- a/samples/widgets/icons/statbox.xpm +++ b/samples/widgets/icons/statbox.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *statbox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"######## ### # ### # ########", -"######## ### # ### #### ########", -"######### # ### # #### #########", -"## #### ##### #### #### ##", -"## ###### # #### ### ######## ##", -"## ##### ### ### ### ######## ##", -"## ##### ### ### ### ##### ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ########################## ##", -"## ##", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *statbox_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"######## ### # ### # ########", +"######## ### # ### #### ########", +"######### # ### # #### #########", +"## #### ##### #### #### ##", +"## ###### # #### ### ######## ##", +"## ##### ### ### ### ######## ##", +"## ##### ### ### ### ##### ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ########################## ##", +"## ##", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/stattext.xpm b/samples/widgets/icons/stattext.xpm index 2e23bbbed1..dec5d9fe06 100644 --- a/samples/widgets/icons/stattext.xpm +++ b/samples/widgets/icons/stattext.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *stattext_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"############### ################", -"############## ################", -"############# ################", -"############ ################", -"###########$ ################", -"##########$ # ################", -"########## ## ######## # #", -"######### ## ###### # ##", -"########$ ### ###### ### ##", -"#######$ #### ##### #### ##", -"####### ##### #### ### ##", -"######$ #### ### ###", -"#####$ ###### ### #### ###", -"####$ ####### ### ### ###", -"#### ######## ### ### ####", -"### ######## ### ## ####", -"## ######### ## # ##", -"# ##### # ## ###", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *stattext_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"############### ################", +"############## ################", +"############# ################", +"############ ################", +"###########$ ################", +"##########$ # ################", +"########## ## ######## # #", +"######### ## ###### # ##", +"########$ ### ###### ### ##", +"#######$ #### ##### #### ##", +"####### ##### #### ### ##", +"######$ #### ### ###", +"#####$ ###### ### #### ###", +"####$ ####### ### ### ###", +"#### ######## ### ### ####", +"### ######## ### ## ####", +"## ######### ## # ##", +"# ##### # ## ###", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/samples/widgets/icons/text.xpm b/samples/widgets/icons/text.xpm index deb8b6e045..3911f2771f 100644 --- a/samples/widgets/icons/text.xpm +++ b/samples/widgets/icons/text.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static char *text_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 16 1", -" c Gray0", -". c #808000", -"X c #000080", -"o c #808080", -"O c #000000", -"+ c #808000", -"@ c #000080", -"# c #c0c0c0", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", -/* pixels */ -"################################", -"################################", -"################################", -"################################", -"################################", -"############################ ###", -"############################ ###", -"############### ########## ###", -"############### ########## ###", -"############### ########## ###", -"############### ########## ###", -"############### ########## ###", -"############### ########## ###", -"#### ### #### ###", -"### ##### ## #### ### ###", -"### ##### ## #### ### ###", -"###### ## #### ### ###", -"#### ## #### ### ###", -"### #### ## #### ### ###", -"### #### ## #### ### ###", -"### #### ## #### ### ###", -"### #### ## #### ### ###", -"### #### ## #### ### ###", -"### #### ## #### ### ###", -"#### ## #### ###", -"############################ ###", -"############################ ###", -"################################", -"################################", -"################################", -"################################", -"################################" -}; +/* XPM */ +static char *text_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +" c Gray0", +". c #808000", +"X c #000080", +"o c #808080", +"O c #000000", +"+ c #808000", +"@ c #000080", +"# c none", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"################################", +"################################", +"################################", +"################################", +"################################", +"############################ ###", +"############################ ###", +"############### ########## ###", +"############### ########## ###", +"############### ########## ###", +"############### ########## ###", +"############### ########## ###", +"############### ########## ###", +"#### ### #### ###", +"### ##### ## #### ### ###", +"### ##### ## #### ### ###", +"###### ## #### ### ###", +"#### ## #### ### ###", +"### #### ## #### ### ###", +"### #### ## #### ### ###", +"### #### ## #### ### ###", +"### #### ## #### ### ###", +"### #### ## #### ### ###", +"### #### ## #### ### ###", +"#### ## #### ###", +"############################ ###", +"############################ ###", +"################################", +"################################", +"################################", +"################################", +"################################" +}; diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index d6319df904..36382fca0a 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -187,10 +187,17 @@ void wxPopupTransientWindow::Popup(wxWindow *winFocus) m_child = this; } + // we can't capture mouse before the window is shown in wxGTL +#ifdef __WXGTK__ + Show(); +#endif + m_child->CaptureMouse(); m_child->PushEventHandler(new wxPopupWindowHandler(this)); +#ifndef __WXGTK__ Show(); +#endif m_focus = winFocus ? winFocus : this; m_focus->PushEventHandler(new wxPopupFocusHandler(this)); diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 15b54ffc16..8dfbf2b096 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3743,15 +3743,13 @@ void wxWindowGTK::CaptureMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); - wxCHECK_RET( g_captureWindow == NULL, wxT("CaptureMouse called twice") ); - GdkWindow *window = (GdkWindow*) NULL; if (m_wxwindow) window = GTK_PIZZA(m_wxwindow)->bin_window; else window = GetConnectWidget()->window; - if (!window) return; + wxCHECK_RET( window, _T("CaptureMouse() failed") ); wxCursor* cursor = & m_cursor; if (!cursor->Ok()) @@ -3774,7 +3772,7 @@ void wxWindowGTK::ReleaseMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); - wxCHECK_RET( g_captureWindow, wxT("ReleaseMouse called twice") ); + wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") ); GdkWindow *window = (GdkWindow*) NULL; if (m_wxwindow) diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 15b54ffc16..8dfbf2b096 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -3743,15 +3743,13 @@ void wxWindowGTK::CaptureMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); - wxCHECK_RET( g_captureWindow == NULL, wxT("CaptureMouse called twice") ); - GdkWindow *window = (GdkWindow*) NULL; if (m_wxwindow) window = GTK_PIZZA(m_wxwindow)->bin_window; else window = GetConnectWidget()->window; - if (!window) return; + wxCHECK_RET( window, _T("CaptureMouse() failed") ); wxCursor* cursor = & m_cursor; if (!cursor->Ok()) @@ -3774,7 +3772,7 @@ void wxWindowGTK::ReleaseMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); - wxCHECK_RET( g_captureWindow, wxT("ReleaseMouse called twice") ); + wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") ); GdkWindow *window = (GdkWindow*) NULL; if (m_wxwindow) diff --git a/src/univ/button.cpp b/src/univ/button.cpp index a6438e0d51..65a5b69c9b 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -152,7 +152,11 @@ wxSize wxButton::DoGetBestClientSize() const void wxButton::DoDraw(wxControlRenderer *renderer) { - renderer->DrawButtonBorder(); + if ( !(GetWindowStyle() & wxBORDER_NONE) ) + { + renderer->DrawButtonBorder(); + } + renderer->DrawLabel(m_bitmap, m_marginBmpX, m_marginBmpY); } diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index b25e4bcb64..76544591d4 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -76,25 +76,35 @@ public: wxComboButton(wxComboControl *combo) : wxBitmapButton(combo->GetParent(), -1, wxNullBitmap, wxDefaultPosition, wxDefaultSize, - wxBORDER_NONE) + wxBORDER_NONE | wxBU_EXACTFIT) { m_combo = combo; - wxBitmap bmpNormal, bmpPressed, bmpDisabled; + wxBitmap bmpNormal, bmpFocus, bmpPressed, bmpDisabled; + + GetRenderer()->GetComboBitmaps(&bmpNormal, + &bmpFocus, + &bmpPressed, + &bmpDisabled); - GetRenderer()->GetComboBitmaps(&bmpNormal, &bmpPressed, &bmpDisabled); SetBitmapLabel(bmpNormal); - SetBitmapFocus(bmpNormal); - SetBitmapSelected(bmpPressed); - SetBitmapDisabled(bmpDisabled); + SetBitmapFocus(bmpFocus.Ok() ? bmpFocus : bmpNormal); + SetBitmapSelected(bmpPressed.Ok() ? bmpPressed : bmpNormal); + SetBitmapDisabled(bmpDisabled.Ok() ? bmpDisabled : bmpNormal); - SetSize(bmpNormal.GetWidth(), bmpNormal.GetHeight()); + SetBestSize(wxDefaultSize); } protected: void OnButton(wxCommandEvent& event) { m_combo->ShowPopup(); } - virtual wxSize DoGetBestSize() const { return GetSize(); } + virtual wxSize DoGetBestClientSize() const + { + const wxBitmap& bmp = GetBitmapLabel(); + + return wxSize(bmp.GetWidth(), bmp.GetHeight()); + + } private: wxComboControl *m_combo; @@ -241,7 +251,8 @@ bool wxComboControl::Create(wxWindow *parent, m_heightPopup = size.y - DoGetBestSize().y; } - DoSetSize(pos.x, pos.y, size.x, size.y); + SetBestSize(size); + Move(pos); // create the popup window immediately here to allow creating the controls // with parent == GetPopupWindow() from the derived class ctor @@ -300,7 +311,7 @@ void wxComboControl::DoMoveWindow(int x, int y, int width, int height) width -= rectBorders.x + rectBorders.width; height -= rectBorders.y + rectBorders.height; - wxSize sizeBtn = m_btn->GetSize(); + wxSize sizeBtn = m_btn->GetBestSize(); wxCoord wText = width - sizeBtn.x; m_text->SetSize(x, y, wText, height); diff --git a/src/univ/themes/gtk.cpp b/src/univ/themes/gtk.cpp index fe2695813a..94fd15e47e 100644 --- a/src/univ/themes/gtk.cpp +++ b/src/univ/themes/gtk.cpp @@ -30,6 +30,7 @@ #include "wx/dcmemory.h" #include "wx/window.h" + #include "wx/bmpbuttn.h" #include "wx/button.h" #include "wx/checkbox.h" #include "wx/listbox.h" @@ -52,7 +53,7 @@ // constants (to be removed, for testing only) // ---------------------------------------------------------------------------- -static const size_t BORDER_THICKNESS = 10; +static const size_t BORDER_THICKNESS = 2; // ---------------------------------------------------------------------------- // wxGTKRenderer: draw the GUI elements in GTK style @@ -857,7 +858,7 @@ void wxGTKRenderer::DrawBorder(wxDC& dc, switch ( border ) { case wxBORDER_SUNKEN: - for ( width = 0; width < BORDER_THICKNESS; width++ ) + for ( width = 0; width < BORDER_THICKNESS / 2; width++ ) { DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); DrawShadedRect(dc, &rect, m_penBlack, m_penLightGrey); @@ -865,24 +866,33 @@ void wxGTKRenderer::DrawBorder(wxDC& dc, break; case wxBORDER_STATIC: - DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); + for ( width = 0; width < BORDER_THICKNESS / 2; width++ ) + { + DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); + } break; case wxBORDER_RAISED: - for ( width = 0; width < BORDER_THICKNESS; width++ ) + for ( width = 0; width < BORDER_THICKNESS / 2; width++ ) { DrawRaisedBorder(dc, &rect); } break; case wxBORDER_DOUBLE: - DrawShadedRect(dc, &rect, m_penLightGrey, m_penBlack); - DrawShadedRect(dc, &rect, m_penHighlight, m_penDarkGrey); - DrawRect(dc, &rect, m_penLightGrey); + for ( width = 0; width < BORDER_THICKNESS / 3; width++ ) + { + DrawShadedRect(dc, &rect, m_penLightGrey, m_penBlack); + DrawShadedRect(dc, &rect, m_penHighlight, m_penDarkGrey); + DrawRect(dc, &rect, m_penLightGrey); + } break; case wxBORDER_SIMPLE: - DrawRect(dc, &rect, m_penBlack); + for ( width = 0; width < BORDER_THICKNESS; width++ ) + { + DrawRect(dc, &rect, m_penBlack); + } break; default: @@ -910,11 +920,11 @@ wxRect wxGTKRenderer::GetBorderDimensions(wxBorder border) const case wxBORDER_SIMPLE: case wxBORDER_STATIC: - width = 1; + width = BORDER_THICKNESS; break; case wxBORDER_DOUBLE: - width = 3; + width = 3*BORDER_THICKNESS; break; default: @@ -954,15 +964,18 @@ void wxGTKRenderer::DrawTextBorder(wxDC& dc, { wxRect rect = rectOrig; - if ( flags & wxCONTROL_FOCUSED ) - { - DrawRect(dc, &rect, m_penBlack); - DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); - } - else // !focused + for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ ) { - DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); - DrawAntiShadedRect(dc, &rect, m_penBlack, m_penHighlight); + if ( flags & wxCONTROL_FOCUSED ) + { + DrawRect(dc, &rect, m_penBlack); + DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); + } + else // !focused + { + DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); + DrawAntiShadedRect(dc, &rect, m_penBlack, m_penHighlight); + } } if ( rectIn ) @@ -980,8 +993,12 @@ void wxGTKRenderer::DrawButtonBorder(wxDC& dc, { // button pressed: draw a black border around it and an inward shade DrawRect(dc, &rect, m_penBlack); - DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); - DrawAntiShadedRect(dc, &rect, m_penBlack, m_penDarkGrey); + + for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ ) + { + DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); + DrawAntiShadedRect(dc, &rect, m_penBlack, m_penDarkGrey); + } } else { @@ -999,10 +1016,13 @@ void wxGTKRenderer::DrawButtonBorder(wxDC& dc, } // now draw a normal button - DrawShadedRect(dc, &rect, m_penHighlight, m_penBlack); - DrawAntiShadedRect(dc, &rect, - wxPen(GetBackgroundColour(flags), 0, wxSOLID), - m_penDarkGrey); + for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ ) + { + DrawShadedRect(dc, &rect, m_penHighlight, m_penBlack); + DrawAntiShadedRect(dc, &rect, + wxPen(GetBackgroundColour(flags), 0, wxSOLID), + m_penDarkGrey); + } } if ( rectIn ) @@ -2280,6 +2300,14 @@ int wxGTKRenderer::PixelToScrollbar(const wxScrollBar *scrollbar, void wxGTKRenderer::AdjustSize(wxSize *size, const wxWindow *window) { +#if wxUSE_BMPBUTTON + if ( wxDynamicCast(window, wxBitmapButton) ) + { + size->x += 4; + size->y += 4; + } else +#endif // wxUSE_BMPBUTTON +#if wxUSE_BUTTON if ( wxDynamicCast(window, wxButton) ) { if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) ) @@ -2293,8 +2321,9 @@ void wxGTKRenderer::AdjustSize(wxSize *size, const wxWindow *window) // button border width size->y += 4; } - } - else if ( wxDynamicCast(window, wxScrollBar) ) + } else +#endif wxUSE_BUTTON + if ( wxDynamicCast(window, wxScrollBar) ) { // we only set the width of vert scrollbars and height of the // horizontal ones -- 2.47.2