summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2017-07-08 10:50:17 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2017-07-08 10:50:17 +0000
commit501e9819954d2fb6dfdb831a71b8752b5afd1a2a (patch)
tree3085e2219179dd023b9863f59be58772a74340d6 /src/ui
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
downloadinkscape-501e9819954d2fb6dfdb831a71b8752b5afd1a2a.tar.gz
inkscape-501e9819954d2fb6dfdb831a71b8752b5afd1a2a.zip
Fix Gtk alignment API
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/calligraphic-profile-rename.cpp3
-rw-r--r--src/ui/dialog/color-item.cpp3
-rw-r--r--src/ui/dialog/document-metadata.cpp6
-rw-r--r--src/ui/dialog/document-properties.cpp22
-rw-r--r--src/ui/dialog/export.cpp6
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp6
-rw-r--r--src/ui/dialog/grid-arrange-tab.cpp3
-rw-r--r--src/ui/dialog/guides.cpp6
-rw-r--r--src/ui/dialog/knot-properties.cpp6
-rw-r--r--src/ui/dialog/layer-properties.cpp6
-rw-r--r--src/ui/dialog/lpe-fillet-chamfer-properties.cpp6
-rw-r--r--src/ui/dialog/lpe-powerstroke-properties.cpp6
-rw-r--r--src/ui/dialog/object-properties.cpp11
-rw-r--r--src/ui/dialog/objects.cpp3
-rw-r--r--src/ui/dialog/polar-arrange-tab.cpp4
-rw-r--r--src/ui/dialog/xml-tree.cpp3
-rw-r--r--src/ui/widget/color-wheel-selector.cpp3
-rw-r--r--src/ui/widget/registered-widget.cpp12
-rw-r--r--src/ui/widget/selected-style.cpp9
-rw-r--r--src/ui/widget/style-swatch.cpp6
-rw-r--r--src/ui/widget/tolerance-slider.cpp9
21 files changed, 84 insertions, 55 deletions
diff --git a/src/ui/dialog/calligraphic-profile-rename.cpp b/src/ui/dialog/calligraphic-profile-rename.cpp
index 36570e769..321df04b0 100644
--- a/src/ui/dialog/calligraphic-profile-rename.cpp
+++ b/src/ui/dialog/calligraphic-profile-rename.cpp
@@ -36,7 +36,8 @@ CalligraphicProfileRename::CalligraphicProfileRename() :
_profile_name_entry.set_activates_default(true);
_profile_name_label.set_label(_("Profile name:"));
- _profile_name_label.set_alignment(1.0, 0.5);
+ _profile_name_label.set_halign(Gtk::ALIGN_END);
+ _profile_name_label.set_valign(Gtk::ALIGN_CENTER);
_layout_table->attach(_profile_name_label, 0, 0, 1, 1);
diff --git a/src/ui/dialog/color-item.cpp b/src/ui/dialog/color-item.cpp
index df4ab6485..8eda9ae08 100644
--- a/src/ui/dialog/color-item.cpp
+++ b/src/ui/dialog/color-item.cpp
@@ -559,7 +559,8 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS
Gtk::Widget* widget = 0;
if ( style == PREVIEW_STYLE_BLURB) {
Gtk::Label *lbl = new Gtk::Label(def.descr);
- lbl->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
+ lbl->set_halign(Gtk::ALIGN_START);
+ lbl->set_valign(Gtk::ALIGN_CENTER);
widget = lbl;
} else {
GtkWidget* eekWidget = eek_preview_new();
diff --git a/src/ui/dialog/document-metadata.cpp b/src/ui/dialog/document-metadata.cpp
index dc1958434..74cf9ef0d 100644
--- a/src/ui/dialog/document-metadata.cpp
+++ b/src/ui/dialog/document-metadata.cpp
@@ -113,9 +113,9 @@ DocumentMetadata::build_metadata()
Gtk::Label *label = Gtk::manage (new Gtk::Label);
label->set_markup (_("<b>Dublin Core Entities</b>"));
- label->set_alignment (0.0);
-
+ label->set_halign(Gtk::ALIGN_START);
label->set_valign(Gtk::ALIGN_CENTER);
+
_page_metadata1.attach(*label, 0, 0, 3, 1);
/* add generic metadata entry areas */
@@ -145,7 +145,7 @@ DocumentMetadata::build_metadata()
row = 0;
Gtk::Label *llabel = Gtk::manage (new Gtk::Label);
llabel->set_markup (_("<b>License</b>"));
- llabel->set_alignment (0.0);
+ llabel->set_halign(Gtk::ALIGN_START);
llabel->set_valign(Gtk::ALIGN_CENTER);
_page_metadata2.attach(*llabel, 0, row, 3, 1);
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 3b2a0a4a3..7d51653db 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -264,13 +264,13 @@ inline void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned cons
}
} else if (arr[i]) {
Gtk::Label& label = reinterpret_cast<Gtk::Label&>(*arr[i]);
- label.set_alignment (0.0);
label.set_hexpand();
+ label.set_halign(Gtk::ALIGN_START);
label.set_valign(Gtk::ALIGN_CENTER);
table.attach(label, 0, r, 3, 1);
} else {
- Gtk::HBox *space = Gtk::manage (new Gtk::HBox);
+ auto space = Gtk::manage (new Gtk::Box);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
space->set_halign(Gtk::ALIGN_CENTER);
@@ -650,9 +650,8 @@ void DocumentProperties::build_cms()
_page_cms->set_spacing(4);
gint row = 0;
- label_link->set_alignment(0.0);
-
label_link->set_hexpand();
+ label_link->set_halign(Gtk::ALIGN_START);
label_link->set_valign(Gtk::ALIGN_CENTER);
_page_cms->table().attach(*label_link, 0, row, 3, 1);
@@ -673,9 +672,8 @@ void DocumentProperties::build_cms()
row++;
- label_avail->set_alignment(0.0);
-
label_avail->set_hexpand();
+ label_avail->set_halign(Gtk::ALIGN_START);
label_avail->set_valign(Gtk::ALIGN_CENTER);
_page_cms->table().attach(*label_avail, 0, row, 3, 1);
@@ -764,8 +762,8 @@ void DocumentProperties::build_scripting()
_page_external_scripts->set_spacing(4);
gint row = 0;
- label_external->set_alignment(0.0);
label_external->set_hexpand();
+ label_external->set_halign(Gtk::ALIGN_START);
label_external->set_valign(Gtk::ALIGN_CENTER);
_page_external_scripts->table().attach(*label_external, 0, row, 3, 1);
@@ -833,8 +831,8 @@ void DocumentProperties::build_scripting()
_page_embedded_scripts->set_spacing(4);
row = 0;
- label_embedded->set_alignment(0.0);
label_embedded->set_hexpand();
+ label_embedded->set_halign(Gtk::ALIGN_START);
label_embedded->set_valign(Gtk::ALIGN_CENTER);
_page_embedded_scripts->table().attach(*label_embedded, 0, row, 3, 1);
@@ -871,8 +869,8 @@ void DocumentProperties::build_scripting()
Gtk::Label *label_embedded_content= Gtk::manage (new Gtk::Label("", Gtk::ALIGN_START));
label_embedded_content->set_markup (_("<b>Content:</b>"));
- label_embedded_content->set_alignment(0.0);
label_embedded_content->set_hexpand();
+ label_embedded_content->set_halign(Gtk::ALIGN_START);
label_embedded_content->set_valign(Gtk::ALIGN_CENTER);
_page_embedded_scripts->table().attach(*label_embedded_content, 0, row, 3, 1);
@@ -940,8 +938,7 @@ void DocumentProperties::build_metadata()
Gtk::Label *label = Gtk::manage (new Gtk::Label);
label->set_markup (_("<b>Dublin Core Entities</b>"));
- label->set_alignment (0.0);
-
+ label->set_halign(Gtk::ALIGN_START);
label->set_valign(Gtk::ALIGN_CENTER);
_page_metadata1->table().attach (*label, 0,0,3,1);
@@ -987,8 +984,7 @@ void DocumentProperties::build_metadata()
row = 0;
Gtk::Label *llabel = Gtk::manage (new Gtk::Label);
llabel->set_markup (_("<b>License</b>"));
- llabel->set_alignment (0.0);
-
+ llabel->set_halign(Gtk::ALIGN_START);
llabel->set_valign(Gtk::ALIGN_CENTER);
_page_metadata2->table().attach(*llabel, 0, row, 3, 1);
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index b1b1cc291..56f3a29c0 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -503,7 +503,8 @@ Glib::RefPtr<Gtk::Adjustment> Export::createSpinbutton( gchar const * /*key*/, f
if (!ll.empty()) {
l = new Gtk::Label(ll,true);
- l->set_alignment (1.0, 0.5);
+ l->set_halign(Gtk::ALIGN_END);
+ l->set_valign(Gtk::ALIGN_CENTER);
l->set_hexpand();
l->set_vexpand();
t->attach(*l, x + pos, y, 1, 1);
@@ -526,7 +527,8 @@ Glib::RefPtr<Gtk::Adjustment> Export::createSpinbutton( gchar const * /*key*/, f
if (!lr.empty()) {
l = new Gtk::Label(lr,true);
- l->set_alignment (0.0, 0.5);
+ l->set_halign(Gtk::ALIGN_START);
+ l->set_valign(Gtk::ALIGN_CENTER);
l->set_hexpand();
l->set_vexpand();
t->attach(*l, x + pos, y, 1, 1);
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 4c4820f00..01d66d588 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -2649,8 +2649,10 @@ FilterEffectsDialog::FilterEffectsDialog()
hpaned->pack2(*_primitive_box);
_getContents()->add(*hpaned);
- _infobox_icon.set_alignment(0, 0);
- _infobox_desc.set_alignment(0, 0);
+ _infobox_icon.set_halign(Gtk::ALIGN_START);
+ _infobox_icon.set_valign(Gtk::ALIGN_START);
+ _infobox_desc.set_halign(Gtk::ALIGN_START);
+ _infobox_desc.set_valign(Gtk::ALIGN_START);
_infobox_desc.set_justify(Gtk::JUSTIFY_LEFT);
_infobox_desc.set_line_wrap(true);
_infobox_desc.set_size_request(200, -1);
diff --git a/src/ui/dialog/grid-arrange-tab.cpp b/src/ui/dialog/grid-arrange-tab.cpp
index bb8fc564a..3cbc1b6e9 100644
--- a/src/ui/dialog/grid-arrange-tab.cpp
+++ b/src/ui/dialog/grid-arrange-tab.cpp
@@ -687,7 +687,8 @@ GridArrangeTab::GridArrangeTab(ArrangeDialog *parent)
// Anchor selection widget
AlignLabel.set_label(_("Alignment:"));
- AlignLabel.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
+ AlignLabel.set_halign(Gtk::ALIGN_START);
+ AlignLabel.set_valign(Gtk::ALIGN_CENTER);
AlignmentSelector.setAlignment(HorizAlign, VertAlign);
AlignmentSelector.on_selectionChanged().connect(sigc::mem_fun(*this, &GridArrangeTab::Align_changed));
TileBox.pack_start(AlignLabel, false, false, MARGIN);
diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp
index 9c8b14953..f0de5ad0d 100644
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
@@ -167,10 +167,12 @@ void GuidelinePropertiesDialog::_setup() {
mainVBox->pack_start(_layout_table, false, false, 0);
_label_name.set_label("foo0");
- _label_name.set_alignment(0, 0.5);
+ _label_name.set_halign(Gtk::ALIGN_START);
+ _label_name.set_valign(Gtk::ALIGN_CENTER);
_label_descr.set_label("foo1");
- _label_descr.set_alignment(0, 0.5);
+ _label_descr.set_halign(Gtk::ALIGN_START);
+ _label_descr.set_valign(Gtk::ALIGN_CENTER);
_label_name.set_halign(Gtk::ALIGN_FILL);
_label_name.set_valign(Gtk::ALIGN_FILL);
diff --git a/src/ui/dialog/knot-properties.cpp b/src/ui/dialog/knot-properties.cpp
index 9008d943a..e69fee52e 100644
--- a/src/ui/dialog/knot-properties.cpp
+++ b/src/ui/dialog/knot-properties.cpp
@@ -55,7 +55,8 @@ KnotPropertiesDialog::KnotPropertiesDialog()
_knot_x_entry.set_range(-G_MAXDOUBLE, G_MAXDOUBLE);
_knot_x_entry.set_hexpand();
_knot_x_label.set_label(_("Position X:"));
- _knot_x_label.set_alignment(1.0, 0.5);
+ _knot_x_label.set_halign(Gtk::ALIGN_END);
+ _knot_x_label.set_valign(Gtk::ALIGN_CENTER);
_knot_y_entry.set_activates_default(true);
_knot_y_entry.set_digits(4);
@@ -63,7 +64,8 @@ KnotPropertiesDialog::KnotPropertiesDialog()
_knot_y_entry.set_range(-G_MAXDOUBLE, G_MAXDOUBLE);
_knot_y_entry.set_hexpand();
_knot_y_label.set_label(_("Position Y:"));
- _knot_y_label.set_alignment(1.0, 0.5);
+ _knot_y_label.set_halign(Gtk::ALIGN_END);
+ _knot_y_label.set_valign(Gtk::ALIGN_CENTER);
_layout_table.attach(_knot_x_label, 0, 0, 1, 1);
_layout_table.attach(_knot_x_entry, 1, 0, 1, 1);
diff --git a/src/ui/dialog/layer-properties.cpp b/src/ui/dialog/layer-properties.cpp
index c8c42ef90..562484022 100644
--- a/src/ui/dialog/layer-properties.cpp
+++ b/src/ui/dialog/layer-properties.cpp
@@ -48,7 +48,8 @@ LayerPropertiesDialog::LayerPropertiesDialog()
// Layer name widgets
_layer_name_entry.set_activates_default(true);
_layer_name_label.set_label(_("Layer name:"));
- _layer_name_label.set_alignment(1.0, 0.5);
+ _layer_name_label.set_halign(Gtk::ALIGN_END);
+ _layer_name_label.set_valign(Gtk::ALIGN_CENTER);
_layer_name_label.set_halign(Gtk::ALIGN_FILL);
_layer_name_label.set_valign(Gtk::ALIGN_FILL);
@@ -165,7 +166,8 @@ LayerPropertiesDialog::_setup_position_controls() {
row->set_value(_dropdown_columns.name, Glib::ustring(_("As sublayer of current")));
_layer_position_label.set_label(_("Position:"));
- _layer_position_label.set_alignment(1.0, 0.5);
+ _layer_position_label.set_halign(Gtk::ALIGN_END);
+ _layer_position_label.set_valign(Gtk::ALIGN_CENTER);
_layer_position_combo.set_halign(Gtk::ALIGN_FILL);
_layer_position_combo.set_valign(Gtk::ALIGN_FILL);
diff --git a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
index 82c6035d4..13264c979 100644
--- a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
+++ b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
@@ -44,7 +44,8 @@ FilletChamferPropertiesDialog::FilletChamferPropertiesDialog()
_fillet_chamfer_position_numeric.set_range(0., SCALARPARAM_G_MAXDOUBLE);
_fillet_chamfer_position_numeric.set_hexpand();
_fillet_chamfer_position_label.set_label(_("Radius (pixels):"));
- _fillet_chamfer_position_label.set_alignment(1.0, 0.5);
+ _fillet_chamfer_position_label.set_halign(Gtk::ALIGN_END);
+ _fillet_chamfer_position_label.set_valign(Gtk::ALIGN_CENTER);
_layout_table.attach(_fillet_chamfer_position_label, 0, 0, 1, 1);
_layout_table.attach(_fillet_chamfer_position_numeric, 1, 0, 1, 1);
@@ -54,7 +55,8 @@ FilletChamferPropertiesDialog::FilletChamferPropertiesDialog()
_fillet_chamfer_chamfer_subdivisions.set_range(0, SCALARPARAM_G_MAXDOUBLE);
_fillet_chamfer_chamfer_subdivisions.set_hexpand();
_fillet_chamfer_chamfer_subdivisions_label.set_label(_("Chamfer subdivisions:"));
- _fillet_chamfer_chamfer_subdivisions_label.set_alignment(1.0, 0.5);
+ _fillet_chamfer_chamfer_subdivisions_label.set_halign(Gtk::ALIGN_END);
+ _fillet_chamfer_chamfer_subdivisions_label.set_valign(Gtk::ALIGN_CENTER);
_layout_table.attach(_fillet_chamfer_chamfer_subdivisions_label, 0, 1, 1, 1);
_layout_table.attach(_fillet_chamfer_chamfer_subdivisions, 1, 1, 1, 1);
diff --git a/src/ui/dialog/lpe-powerstroke-properties.cpp b/src/ui/dialog/lpe-powerstroke-properties.cpp
index 0757aa1c3..bc3fbd828 100644
--- a/src/ui/dialog/lpe-powerstroke-properties.cpp
+++ b/src/ui/dialog/lpe-powerstroke-properties.cpp
@@ -50,7 +50,8 @@ PowerstrokePropertiesDialog::PowerstrokePropertiesDialog()
_powerstroke_position_entry.set_range(-SCALARPARAM_G_MAXDOUBLE, SCALARPARAM_G_MAXDOUBLE);
_powerstroke_position_entry.set_hexpand();
_powerstroke_position_label.set_label(_("Position:"));
- _powerstroke_position_label.set_alignment(1.0, 0.5);
+ _powerstroke_position_label.set_halign(Gtk::ALIGN_END);
+ _powerstroke_position_label.set_valign(Gtk::ALIGN_CENTER);
_powerstroke_width_entry.set_activates_default(true);
_powerstroke_width_entry.set_digits(4);
@@ -58,7 +59,8 @@ PowerstrokePropertiesDialog::PowerstrokePropertiesDialog()
_powerstroke_width_entry.set_range(-SCALARPARAM_G_MAXDOUBLE, SCALARPARAM_G_MAXDOUBLE);
_powerstroke_width_entry.set_hexpand();
_powerstroke_width_label.set_label(_("Width:"));
- _powerstroke_width_label.set_alignment(1.0, 0.5);
+ _powerstroke_width_label.set_halign(Gtk::ALIGN_END);
+ _powerstroke_width_label.set_valign(Gtk::ALIGN_CENTER);
_layout_table.attach(_powerstroke_position_label,0,0,1,1);
_layout_table.attach(_powerstroke_position_entry,1,0,1,1);
diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp
index 191216eea..4c8bd4176 100644
--- a/src/ui/dialog/object-properties.cpp
+++ b/src/ui/dialog/object-properties.cpp
@@ -108,7 +108,7 @@ void ObjectProperties::_init()
/* Create the label for the object id */
_label_id.set_label(_label_id.get_label() + " ");
- _label_id.set_alignment(1, 0.5);
+ _label_id.set_halign(Gtk::ALIGN_END);
_label_id.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_label_id, 0, 0, 1, 1);
@@ -128,8 +128,7 @@ void ObjectProperties::_init()
/* Create the label for the object label */
_label_label.set_label(_label_label.get_label() + " ");
- _label_label.set_alignment(1, 0.5);
-
+ _label_label.set_halign(Gtk::ALIGN_END);
_label_label.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_label_label, 0, 1, 1, 1);
@@ -149,8 +148,7 @@ void ObjectProperties::_init()
/* Create the label for the object title */
_label_title.set_label(_label_title.get_label() + " ");
- _label_title.set_alignment (1, 0.5);
-
+ _label_title.set_halign(Gtk::ALIGN_END);
_label_title.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_label_title, 0, 2, 1, 1);
@@ -187,8 +185,7 @@ void ObjectProperties::_init()
/* Image rendering */
/* Create the label for the object ImageRendering */
_label_image_rendering.set_label(_label_image_rendering.get_label() + " ");
- _label_image_rendering.set_alignment(1, 0.5);
-
+ _label_image_rendering.set_halign(Gtk::ALIGN_END);
_label_image_rendering.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_label_image_rendering, 0, 3, 1, 1);
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp
index 8df515714..227fb57b1 100644
--- a/src/ui/dialog/objects.cpp
+++ b/src/ui/dialog/objects.cpp
@@ -1829,7 +1829,8 @@ ObjectsPanel::ObjectsPanel() :
//Opacity
_composite_vbox.pack_start(_opacity_vbox, false, false, 2);
- _opacity_label.set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER);
+ _opacity_label.set_halign(Gtk::ALIGN_END);
+ _opacity_label.set_valign(Gtk::ALIGN_CENTER);
_opacity_hbox.pack_start(_opacity_label, false, false, 3);
_opacity_vbox.pack_start(_opacity_hbox, false, false, 0);
_opacity_hbox.pack_start(_opacity_hscale, true, true, 0);
diff --git a/src/ui/dialog/polar-arrange-tab.cpp b/src/ui/dialog/polar-arrange-tab.cpp
index b65a67e06..2b4550d20 100644
--- a/src/ui/dialog/polar-arrange-tab.cpp
+++ b/src/ui/dialog/polar-arrange-tab.cpp
@@ -39,7 +39,7 @@ PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_)
angleX("", C_("Polar arrange tab", "End angle"), angleY)
{
anchorPointLabel.set_text(C_("Polar arrange tab", "Anchor point:"));
- anchorPointLabel.set_alignment(Gtk::ALIGN_START);
+ anchorPointLabel.set_halign(Gtk::ALIGN_START);
pack_start(anchorPointLabel, false, false);
anchorBoundingBoxRadio.set_label(C_("Polar arrange tab", "Objects' bounding boxes:"));
@@ -55,7 +55,7 @@ PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_)
pack_start(anchorObjectPivotRadio, false, false);
arrangeOnLabel.set_text(C_("Polar arrange tab", "Arrange on:"));
- arrangeOnLabel.set_alignment(Gtk::ALIGN_START);
+ arrangeOnLabel.set_halign(Gtk::ALIGN_START);
pack_start(arrangeOnLabel, false, false);
arrangeOnFirstCircleRadio.set_label(C_("Polar arrange tab", "First selected circle/ellipse/arc"));
diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp
index d9ea73673..d39a4cb8d 100644
--- a/src/ui/dialog/xml-tree.cpp
+++ b/src/ui/dialog/xml-tree.cpp
@@ -86,7 +86,8 @@ XmlTree::XmlTree (void) :
contents->set_spacing(0);
contents->set_size_request(320, 260);
- status.set_alignment( 0.0, 0.5);
+ status.set_halign(Gtk::ALIGN_START);
+ status.set_valign(Gtk::ALIGN_CENTER);
status.set_size_request(1, -1);
status.set_markup("");
status.set_line_wrap(true);
diff --git a/src/ui/widget/color-wheel-selector.cpp b/src/ui/widget/color-wheel-selector.cpp
index 4f011c6c3..6bbb8e21d 100644
--- a/src/ui/widget/color-wheel-selector.cpp
+++ b/src/ui/widget/color-wheel-selector.cpp
@@ -62,7 +62,8 @@ void ColorWheelSelector::_initUI()
/* Label */
Gtk::Label *label = Gtk::manage(new Gtk::Label(_("_A:"), true));
- label->set_alignment(1.0, 0.5);
+ label->set_halign(Gtk::ALIGN_END);
+ label->set_valign(Gtk::ALIGN_CENTER);
label->show();
#if GTK_CHECK_VERSION(3, 12, 0)
diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp
index be677a434..0af5bdba0 100644
--- a/src/ui/widget/registered-widget.cpp
+++ b/src/ui/widget/registered-widget.cpp
@@ -55,7 +55,11 @@ RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const
Gtk::Label *l = new Gtk::Label (label);
l->set_use_underline (true);
add (*manage (l));
- set_alignment (right? 1.0 : 0.0, 0.5);
+
+ if(right) set_halign(Gtk::ALIGN_END);
+ else set_halign(Gtk::ALIGN_START);
+
+ set_valign(Gtk::ALIGN_CENTER);
_toggled_connection = signal_toggled().connect (sigc::mem_fun (*this, &RegisteredCheckButton::on_toggled));
}
@@ -107,7 +111,11 @@ RegisteredToggleButton::RegisteredToggleButton (const Glib::ustring& /*label*/,
init_parent(key, wr, repr_in, doc_in);
setProgrammatically = false;
set_tooltip_text (tip);
- set_alignment (right? 1.0 : 0.0, 0.5);
+
+ if(right) set_halign(Gtk::ALIGN_END);
+ else set_halign(Gtk::ALIGN_START);
+
+ set_valign(Gtk::ALIGN_CENTER);
_toggled_connection = signal_toggled().connect (sigc::mem_fun (*this, &RegisteredToggleButton::on_toggled));
}
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 65d68195c..8ea1e530f 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -146,11 +146,14 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_drop[0] = _drop[1] = 0;
_dropEnabled[0] = _dropEnabled[1] = false;
- _fill_label.set_alignment(0.0, 0.5);
+ _fill_label.set_halign(Gtk::ALIGN_START);
+ _fill_label.set_valign(Gtk::ALIGN_CENTER);
_fill_label.set_padding(0, 0);
- _stroke_label.set_alignment(0.0, 0.5);
+ _stroke_label.set_halign(Gtk::ALIGN_START);
+ _stroke_label.set_valign(Gtk::ALIGN_CENTER);
_stroke_label.set_padding(0, 0);
- _opacity_label.set_alignment(0.0, 0.5);
+ _opacity_label.set_halign(Gtk::ALIGN_START);
+ _opacity_label.set_valign(Gtk::ALIGN_CENTER);
_opacity_label.set_padding(0, 0);
_table.set_column_spacing(2);
diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp
index f8eac1c78..4beb0b323 100644
--- a/src/ui/widget/style-swatch.cpp
+++ b/src/ui/widget/style-swatch.cpp
@@ -116,13 +116,15 @@ StyleSwatch::StyleSwatch(SPCSSAttr *css, gchar const *main_tip)
_label[SS_STROKE].set_markup(_("Stroke:"));
for (int i = SS_FILL; i <= SS_STROKE; i++) {
- _label[i].set_alignment(0.0, 0.5);
+ _label[i].set_halign(Gtk::ALIGN_START);
+ _label[i].set_valign(Gtk::ALIGN_CENTER);
_label[i].set_padding(0, 0);
_color_preview[i] = new Inkscape::UI::Widget::ColorPreview (0);
}
- _opacity_value.set_alignment(0.0, 0.5);
+ _opacity_value.set_halign(Gtk::ALIGN_START);
+ _opacity_value.set_valign(Gtk::ALIGN_CENTER);
_opacity_value.set_padding(0, 0);
_table->set_column_spacing(2);
diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp
index dea14585d..47e646c34 100644
--- a/src/ui/widget/tolerance-slider.cpp
+++ b/src/ui/widget/tolerance-slider.cpp
@@ -72,7 +72,8 @@ void ToleranceSlider::init (const Glib::ustring& label1, const Glib::ustring& la
Gtk::Label *theLabel1 = Gtk::manage(new Gtk::Label(label1));
theLabel1->set_use_underline();
- theLabel1->set_alignment(0, 0.5);
+ theLabel1->set_halign(Gtk::ALIGN_START);
+ theLabel1->set_valign(Gtk::ALIGN_CENTER);
// align the label with the checkbox text above by indenting 22 px.
_hbox->pack_start(*theLabel1, Gtk::PACK_EXPAND_WIDGET, 22);
@@ -100,9 +101,11 @@ void ToleranceSlider::init (const Glib::ustring& label1, const Glib::ustring& la
_button1->set_tooltip_text (tip2);
_button2->set_tooltip_text (tip3);
_button1->add (*theLabel3);
- _button1->set_alignment (0.0, 0.5);
+ _button1->set_halign(Gtk::ALIGN_START);
+ _button1->set_valign(Gtk::ALIGN_CENTER);
_button2->add (*theLabel2);
- _button2->set_alignment (0.0, 0.5);
+ _button2->set_halign(Gtk::ALIGN_START);
+ _button2->set_valign(Gtk::ALIGN_CENTER);
_vbox->add (*_button1);
_vbox->add (*_button2);