diff --git a/share/ui/style.css b/share/ui/style.css index 4c40bc8c679485a0b4eb37aa79256aa821bcdab7..2078a1fcbcf86dd48f86b2a9b3446ffb0b492952 100644 --- a/share/ui/style.css +++ b/share/ui/style.css @@ -180,3 +180,16 @@ spinbutton undershoot { color:rgb(0,0,0); } +#monoStrokeWidth, +#fillEmptySpace, +#SelectStatus, +#CoordinateStatusX, +#CoordinateStatusY, +#DesktopMainTable spinbutton{ + font-family:sans-serif; +} + +#fillEmptySpace, +#monoStrokeWidth{ + min-width:47px; /*min width to avoid movement on message label*/ +} diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index 0fc19e282335ad1539caf8fb60400503939bbd6a..ee37c1ddb5299ce7b8c03f86af4878207795cfb9 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -116,32 +116,40 @@ static guint nui_drop_target_entries = G_N_ELEMENTS(ui_drop_target_entries); static Dialog::FillAndStroke *get_fill_and_stroke_panel(SPDesktop *desktop); SelectedStyle::SelectedStyle(bool /*layout*/) - : - current_stroke_width(0), - - _sw_unit(nullptr), - - _desktop (nullptr), - _table(), - _fill_label (_("Fill:")), - _stroke_label (_("Stroke:")), - _opacity_label (_("O:")), - - _fill_place(this, SS_FILL), - _stroke_place(this, SS_STROKE), - - _fill_flag_place (), - _stroke_flag_place (), - - _opacity_place (), - _opacity_adjustment(Gtk::Adjustment::create(100, 0.0, 100, 1.0, 10.0)), - _opacity_sb (0.02, 0), - - _stroke (), - _stroke_width_place(this), - _stroke_width (""), - - _opacity_blocked (false) + : current_stroke_width(0) + , + + _sw_unit(nullptr) + , + + _desktop(nullptr) + , _table() + , _fill_label(_("Fill:")) + , _stroke_label(_("Stroke:")) + , _opacity_label(_("O:")) + , + + _fill_place(this, SS_FILL) + , _stroke_place(this, SS_STROKE) + , + + _fill_flag_place() + , _stroke_flag_place() + , + + _opacity_place() + , _opacity_adjustment(Gtk::Adjustment::create(100, 0.0, 100, 1.0, 10.0)) + , _opacity_sb(0.02, 0) + , + + _fill() + , _stroke() + , _stroke_width_place(this) + , _stroke_width("") + , _fill_empty_space("") + , + + _opacity_blocked(false) { set_name("SelectedStyle"); _drop[0] = _drop[1] = nullptr; @@ -159,6 +167,9 @@ SelectedStyle::SelectedStyle(bool /*layout*/) _opacity_label.set_valign(Gtk::ALIGN_CENTER); _opacity_label.set_margin_top(0); _opacity_label.set_margin_bottom(0); + _stroke_width.set_name("monoStrokeWidth"); + _fill_empty_space.set_name("fillEmptySpace"); + #if GTK_CHECK_VERSION(3,12,0) _fill_label.set_margin_start(0); @@ -371,6 +382,8 @@ SelectedStyle::SelectedStyle(bool /*layout*/) _fill_place.add(_na[SS_FILL]); _fill_place.set_tooltip_text(__na[SS_FILL]); + _fill.pack_start(_fill_place, Gtk::PACK_SHRINK); + _fill.pack_start(_fill_empty_space, Gtk::PACK_SHRINK); _stroke_place.add(_na[SS_STROKE]); _stroke_place.set_tooltip_text(__na[SS_STROKE]); @@ -390,7 +403,7 @@ SelectedStyle::SelectedStyle(bool /*layout*/) _table.attach(_fill_flag_place, 1, 0, 1, 1); _table.attach(_stroke_flag_place, 1, 1, 1, 1); - _table.attach(_fill_place, 2, 0, 1, 1); + _table.attach(_fill, 2, 0, 1, 1); _table.attach(_stroke, 2, 1, 1, 1); _opacity_place.add(_opacity_label); diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h index f65680242c6fd1e5db4c199b9fe4d7616ed2f27d..490f4290a4b985e07f2d8d8cec1117d17065e6fa 100644 --- a/src/ui/widget/selected-style.h +++ b/src/ui/widget/selected-style.h @@ -191,9 +191,11 @@ protected: Gtk::Label _multiple[2]; Glib::ustring __multiple[2]; + Gtk::HBox _fill; Gtk::HBox _stroke; RotateableStrokeWidth _stroke_width_place; Gtk::Label _stroke_width; + Gtk::Label _fill_empty_space; Glib::ustring _paintserver_id[2]; diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 1b717f351c5d13484c9417042789ac725f57371e..088261f29163fe97ecf6591c7eae6a95b71cd54d 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -668,8 +668,10 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) gtk_grid_attach(GTK_GRID(dtw->coord_status), label_y, 1, 1, 1, 1); dtw->coord_status_x = gtk_label_new(nullptr); dtw->coord_status_y = gtk_label_new(nullptr); - gtk_label_set_markup( GTK_LABEL(dtw->coord_status_x), " 0.00 " ); - gtk_label_set_markup( GTK_LABEL(dtw->coord_status_y), " 0.00 " ); + gtk_widget_set_name(dtw->coord_status_x, "CoordinateStatusX"); + gtk_widget_set_name(dtw->coord_status_y, "CoordinateStatusY"); + gtk_label_set_markup( GTK_LABEL(dtw->coord_status_x), " 0.00 " ); + gtk_label_set_markup( GTK_LABEL(dtw->coord_status_y), " 0.00 " ); auto label_z = gtk_label_new(_("Z:")); gtk_widget_set_name(label_z, "ZLabel"); @@ -1273,11 +1275,11 @@ void SPDesktopWidget::setCoordinateStatus(Geom::Point p) { gchar *cstr; - cstr = g_strdup_printf("%7.2f ", dt2r * p[Geom::X]); + cstr = g_strdup_printf("%7.2f", dt2r * p[Geom::X]); gtk_label_set_markup( GTK_LABEL(this->coord_status_x), cstr ); g_free(cstr); - cstr = g_strdup_printf("%7.2f ", dt2r * p[Geom::Y]); + cstr = g_strdup_printf("%7.2f", dt2r * p[Geom::Y]); gtk_label_set_markup( GTK_LABEL(this->coord_status_y), cstr ); g_free(cstr); }