kate.kulikova
2009-05-12 15:44:02 UTC
Hello!
I was trying to draw native check-boxes of different size using
wxRendrerNative on Linux. But every time I passed different rectangles
to wxRendererGTK::DrawCheckBox() function I got the same size of check-
box picture. For small rectangles some of the parts of check-box image
were just cut out.
I looked into the code of wxWidgets and in the file
"wxWidgets-2.8.9\src\gtk\renderer.cpp" I found the following call in
wxRendererGTK::DrawCheckBox() function (line 549):
gtk_paint_check
(
button->style,
gdk_window,
state,
flags & wxCONTROL_CHECKED ? GTK_SHADOW_IN : GTK_SHADOW_OUT,
NULL,
button,
"cellcheck",
dc.LogicalToDeviceX(rect.x)+2,
dc.LogicalToDeviceY(rect.y)+3,
13, 13
);
As I can see from this piece of code all check-boxes on GTK are forced
to have 13x13 size and their position is tuned by 2 and 3 pixels.
So, my question is the following: is there any opportunity (or is it
planned) for drawing native check-boxes with different sizes on GTK
(as similar functionality works well on Windows as far as I know)?
I was trying to draw native check-boxes of different size using
wxRendrerNative on Linux. But every time I passed different rectangles
to wxRendererGTK::DrawCheckBox() function I got the same size of check-
box picture. For small rectangles some of the parts of check-box image
were just cut out.
I looked into the code of wxWidgets and in the file
"wxWidgets-2.8.9\src\gtk\renderer.cpp" I found the following call in
wxRendererGTK::DrawCheckBox() function (line 549):
gtk_paint_check
(
button->style,
gdk_window,
state,
flags & wxCONTROL_CHECKED ? GTK_SHADOW_IN : GTK_SHADOW_OUT,
NULL,
button,
"cellcheck",
dc.LogicalToDeviceX(rect.x)+2,
dc.LogicalToDeviceY(rect.y)+3,
13, 13
);
As I can see from this piece of code all check-boxes on GTK are forced
to have 13x13 size and their position is tuned by 2 and 3 pixels.
So, my question is the following: is there any opportunity (or is it
planned) for drawing native check-boxes with different sizes on GTK
(as similar functionality works well on Windows as far as I know)?