[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-swt-dev] Margin for GtkSpinButton in GTK2?
|
Hello,
I'm working on DateTime #394534, to replace SWT Text with GtkSpinButton
widget.
An outstanding issue is that when SWT.DATE and SWT.DROP_DOWN is used,
(i.e, use a drop down calendar to select the date), then the button is
placed 'on top' of the text field instead of next to it.
When I try to move it to the right, it is visually cut off.
(Please see the attached screen shot).
For GTK3, I solved it by adding a margin to the GtkSpinButton control:
gtk_widget_set_margin_right(.., buttonSize) @Gtk 3.0 - 3.12
gtk_widget_set_margin_end(.., buttonSize) @Gtk 3.12+
However, I'm having difficulties doing the same for GTK2 as there is no
'set margin' function. (AFAICT)
To be more precise, GtkSpinButton inherits from GtkWidget.
GtkWidget in GTK3 has a 'margin-end' property:
https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget.properties
However, in GTK2 widget lacks this 'margin' property:
https://developer.gnome.org/gtk2/stable/GtkWidget.html
Does anyone know a solution to this?
Thank you
Leo Ufimstev | Red Hat
Attachment:
SWT button cut off.png
Description: PNG image