diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2017-07-09 22:28:38 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2017-07-09 22:28:38 +0000 |
| commit | 28d0874e77b657f504419ee5dca1bf1d5fa1675b (patch) | |
| tree | 26f73d70621d43a6021ec2804de6c693869bf1e3 /src | |
| parent | Fix build for Gtk < 3.12 (diff) | |
| download | inkscape-28d0874e77b657f504419ee5dca1bf1d5fa1675b.tar.gz inkscape-28d0874e77b657f504419ee5dca1bf1d5fa1675b.zip | |
Update Gtk margin handling
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/input.cpp | 12 | ||||
| -rw-r--r-- | src/ui/widget/selected-style.cpp | 25 | ||||
| -rw-r--r-- | src/ui/widget/style-swatch.cpp | 22 |
3 files changed, 53 insertions, 6 deletions
diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp index 9fd2288e7..91611f2f2 100644 --- a/src/ui/dialog/input.cpp +++ b/src/ui/dialog/input.cpp @@ -605,7 +605,17 @@ InputDialogImpl::InputDialogImpl() : testDetector.add(imageTable); testFrame.add(testDetector); testThumb.set(getPix(PIX_TABLET)); - testThumb.set_padding(24, 24); + testThumb.set_margin_top(24); + testThumb.set_margin_bottom(24); + +#if GTK_CHECK_VERSION(3,12,0) + testThumb.set_margin_start(24); + testThumb.set_margin_end(24); +#else + testThumb.set_margin_left(24); + testThumb.set_margin_right(24); +#endif + testThumb.set_hexpand(); testThumb.set_vexpand(); imageTable.attach(testThumb, 0, 0, 8, 1); diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index 504e9a813..68acddfcc 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -148,13 +148,32 @@ SelectedStyle::SelectedStyle(bool /*layout*/) _fill_label.set_halign(Gtk::ALIGN_START); _fill_label.set_valign(Gtk::ALIGN_CENTER); - _fill_label.set_padding(0, 0); + _fill_label.set_margin_top(0); + _fill_label.set_margin_bottom(0); _stroke_label.set_halign(Gtk::ALIGN_START); _stroke_label.set_valign(Gtk::ALIGN_CENTER); - _stroke_label.set_padding(0, 0); + _stroke_label.set_margin_top(0); + _stroke_label.set_margin_bottom(0); _opacity_label.set_halign(Gtk::ALIGN_START); _opacity_label.set_valign(Gtk::ALIGN_CENTER); - _opacity_label.set_padding(0, 0); + _opacity_label.set_margin_top(0); + _opacity_label.set_margin_bottom(0); + +#if GTK_CHECK_VERSION(3,12,0) + _fill_label.set_margin_start(0); + _fill_label.set_margin_end(0); + _stroke_label.set_margin_start(0); + _stroke_label.set_margin_end(0); + _opacity_label.set_margin_start(0); + _opacity_label.set_margin_end(0); +#else + _fill_label.set_margin_left(0); + _fill_label.set_margin_right(0); + _stroke_label.set_margin_left(0); + _stroke_label.set_margin_right(0); + _opacity_label.set_margin_left(0); + _opacity_label.set_margin_right(0); +#endif _table.set_column_spacing(2); _table.set_row_spacing(0); diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp index 4beb0b323..2dccb55c4 100644 --- a/src/ui/widget/style-swatch.cpp +++ b/src/ui/widget/style-swatch.cpp @@ -118,14 +118,32 @@ StyleSwatch::StyleSwatch(SPCSSAttr *css, gchar const *main_tip) for (int i = SS_FILL; i <= SS_STROKE; i++) { _label[i].set_halign(Gtk::ALIGN_START); _label[i].set_valign(Gtk::ALIGN_CENTER); - _label[i].set_padding(0, 0); + _label[i].set_margin_top(0); + _label[i].set_margin_bottom(0); + +#if GTK_CHECK_VERSION(3,12,0) + _label[i].set_margin_start(0); + _label[i].set_margin_end(0); +#else + _label[i].set_margin_left(0); + _label[i].set_margin_right(0); +#endif _color_preview[i] = new Inkscape::UI::Widget::ColorPreview (0); } _opacity_value.set_halign(Gtk::ALIGN_START); _opacity_value.set_valign(Gtk::ALIGN_CENTER); - _opacity_value.set_padding(0, 0); + _opacity_value.set_margin_top(0); + _opacity_value.set_margin_bottom(0); + +#if GTK_CHECK_VERSION(3,12,0) + _opacity_value.set_margin_start(0); + _opacity_value.set_margin_end(0); +#else + _opacity_value.set_margin_left(0); + _opacity_value.set_margin_right(0); +#endif _table->set_column_spacing(2); _table->set_row_spacing(0); |
