diff options
| author | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-03-30 01:39:59 +0000 |
|---|---|---|
| committer | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-04-02 08:55:59 +0000 |
| commit | 53ead5269c16cf7decee30713b0cd0d1456e7138 (patch) | |
| tree | 66fda5dd8d50d5a7b86e22690742b607a7d01381 /src | |
| parent | Avoid crash from nullptr exception (diff) | |
| download | inkscape-53ead5269c16cf7decee30713b0cd0d1456e7138.tar.gz inkscape-53ead5269c16cf7decee30713b0cd0d1456e7138.zip | |
Tidy various dialog UIs
Diffstat (limited to 'src')
25 files changed, 337 insertions, 208 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 96fd5a205..f4a210fe6 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -342,6 +342,7 @@ CanvasGrid::newWidget() inner->pack_start(*left, true, true); inner->pack_start(*right, false, false); vbox->pack_start(*inner, false, false); + vbox->set_border_width(4); std::list<Gtk::Widget*> slaves; for (auto &item : left->get_children()) { diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index 6b95d96a7..9bbeabd45 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -754,11 +754,14 @@ Gtk::VBox * Extension::get_info_widget() { Gtk::VBox * retval = Gtk::manage(new Gtk::VBox()); + retval->set_border_width(4); Gtk::Frame * info = Gtk::manage(new Gtk::Frame("General Extension Information")); - retval->pack_start(*info, true, true, 5); + retval->pack_start(*info, true, true, 4); auto table = Gtk::manage(new Gtk::Grid()); + table->set_border_width(4); + table->set_column_spacing(4); info->add(*table); @@ -767,7 +770,6 @@ Extension::get_info_widget() add_val(_("ID:"), id, table, &row); add_val(_("State:"), _state == STATE_LOADED ? _("Loaded") : _state == STATE_UNLOADED ? _("Unloaded") : _("Deactivated"), table, &row); - retval->show_all(); return retval; } @@ -778,8 +780,8 @@ void Extension::add_val(Glib::ustring labelstr, Glib::ustring valuestr, Gtk::Gri Gtk::Label * value; (*row)++; - label = Gtk::manage(new Gtk::Label(labelstr)); - value = Gtk::manage(new Gtk::Label(valuestr)); + label = Gtk::manage(new Gtk::Label(labelstr, Gtk::ALIGN_START)); + value = Gtk::manage(new Gtk::Label(valuestr, Gtk::ALIGN_START)); table->attach(*label, 0, (*row) - 1, 1, 1); table->attach(*value, 1, (*row) - 1, 1, 1); @@ -794,10 +796,12 @@ Gtk::VBox * Extension::get_help_widget() { Gtk::VBox * retval = Gtk::manage(new Gtk::VBox()); + retval->set_border_width(4); if (_help == nullptr) { Gtk::Label * content = Gtk::manage(new Gtk::Label(_("Currently there is no help available for this Extension. Please look on the Inkscape website or ask on the mailing lists if you have questions regarding this extension."))); - retval->pack_start(*content, true, true, 5); + content->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_START); + retval->pack_start(*content, true, true, 4); content->set_line_wrap(true); content->show(); } else { @@ -815,7 +819,7 @@ Extension::get_params_widget() { Gtk::VBox * retval = Gtk::manage(new Gtk::VBox()); Gtk::Widget * content = Gtk::manage(new Gtk::Label("Params")); - retval->pack_start(*content, true, true, 5); + retval->pack_start(*content, true, true, 4); content->show(); retval->show(); return retval; diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index 8b4cc5aa7..5e1a91589 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -122,13 +122,16 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/) _pageSettingsFrame = Gtk::manage(new class Inkscape::UI::Widget::Frame(_("Page settings"))); _labelPrecision = Gtk::manage(new class Gtk::Label(_("Precision of approximating gradient meshes:"))); _labelPrecisionWarning = Gtk::manage(new class Gtk::Label(_("<b>Note</b>: setting the precision too high may result in a large SVG file and slow performance."))); + _labelPrecisionWarning->set_max_width_chars(50); #ifdef HAVE_POPPLER_CAIRO Gtk::RadioButton::Group group; _importViaPoppler = Gtk::manage(new class Gtk::RadioButton(group,_("Poppler/Cairo import"))); _labelViaPoppler = Gtk::manage(new class Gtk::Label(_("Import via external library. Text consists of groups containing cloned glyphs where each glyph is a path. Images are stored internally. Meshes cause entire document to be rendered as a raster image."))); + _labelViaPoppler->set_max_width_chars(50); _importViaInternal = Gtk::manage(new class Gtk::RadioButton(group,_("Internal import"))); _labelViaInternal = Gtk::manage(new class Gtk::Label(_("Import via internal (Poppler derived) library. Text is stored as text but white space is missing. Meshes are converted to tiles, the number depends on the precision set below."))); + _labelViaInternal->set_max_width_chars(50); #endif _fallbackPrecisionSlider_adj = Gtk::Adjustment::create(2, 1, 256, 1, 10, 10); diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp index 1d5321531..34e06c3fe 100644 --- a/src/ui/dialog/clonetiler.cpp +++ b/src/ui/dialog/clonetiler.cpp @@ -166,6 +166,7 @@ CloneTiler::CloneTiler () : // TRANSLATORS: "shift" means: the tiles will be shifted (offset) horizontally by this amount // xgettext:no-c-format gtk_label_set_markup (GTK_LABEL(l), _("<b>Shift X:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 2, 1); } @@ -198,6 +199,7 @@ CloneTiler::CloneTiler () : // TRANSLATORS: "shift" means: the tiles will be shifted (offset) vertically by this amount // xgettext:no-c-format gtk_label_set_markup (GTK_LABEL(l), _("<b>Shift Y:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 3, 1); } @@ -229,6 +231,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>Exponent:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 4, 1); } @@ -251,6 +254,7 @@ CloneTiler::CloneTiler () : GtkWidget *l = gtk_label_new (""); // TRANSLATORS: "Alternate" is a verb here gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 5, 1); } @@ -269,6 +273,7 @@ CloneTiler::CloneTiler () : GtkWidget *l = gtk_label_new (""); // TRANSLATORS: "Cumulate" is a verb here gtk_label_set_markup (GTK_LABEL(l), _("<small>Cumulate:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 6, 1); } @@ -287,6 +292,7 @@ CloneTiler::CloneTiler () : GtkWidget *l = gtk_label_new (""); // TRANSLATORS: "Cumulate" is a verb here gtk_label_set_markup (GTK_LABEL(l), _("<small>Exclude tile:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 7, 1); } @@ -315,6 +321,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>Scale X:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 2, 1); } @@ -345,6 +352,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>Scale Y:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 3, 1); } @@ -375,6 +383,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>Exponent:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 4, 1); } @@ -395,6 +404,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>Base:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 5, 1); } @@ -415,6 +425,7 @@ CloneTiler::CloneTiler () : GtkWidget *l = gtk_label_new (""); // TRANSLATORS: "Alternate" is a verb here gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 6, 1); } @@ -433,6 +444,7 @@ CloneTiler::CloneTiler () : GtkWidget *l = gtk_label_new (""); // TRANSLATORS: "Cumulate" is a verb here gtk_label_set_markup (GTK_LABEL(l), _("<small>Cumulate:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 7, 1); } @@ -461,6 +473,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>Angle:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 2, 1); } @@ -491,6 +504,7 @@ CloneTiler::CloneTiler () : GtkWidget *l = gtk_label_new (""); // TRANSLATORS: "Alternate" is a verb here gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 3, 1); } @@ -509,6 +523,7 @@ CloneTiler::CloneTiler () : GtkWidget *l = gtk_label_new (""); // TRANSLATORS: "Cumulate" is a verb here gtk_label_set_markup (GTK_LABEL(l), _("<small>Cumulate:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 4, 1); } @@ -538,6 +553,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>Blur:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 2, 1); } @@ -564,6 +580,7 @@ CloneTiler::CloneTiler () : GtkWidget *l = gtk_label_new (""); // TRANSLATORS: "Alternate" is a verb here gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 3, 1); } @@ -584,6 +601,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>Opacity:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 4, 1); } @@ -610,6 +628,7 @@ CloneTiler::CloneTiler () : GtkWidget *l = gtk_label_new (""); // TRANSLATORS: "Alternate" is a verb here gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 5, 1); } @@ -654,6 +673,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>H:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 2, 1); } @@ -681,6 +701,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>S:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 3, 1); } @@ -707,6 +728,7 @@ CloneTiler::CloneTiler () : { GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<b>L:</b>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 4, 1); } @@ -733,6 +755,7 @@ CloneTiler::CloneTiler () : { // alternates GtkWidget *l = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>")); + gtk_label_set_xalign(GTK_LABEL(l), 0.0); gtk_size_group_add_widget(table_row_labels, l); table_attach (table, l, 1, 5, 1); } @@ -754,6 +777,7 @@ CloneTiler::CloneTiler () : GtkWidget *vb = new_tab (nb, _("_Trace")); { auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN); + gtk_container_set_border_width(GTK_CONTAINER(hb), 4); gtk_box_set_homogeneous(GTK_BOX(hb), FALSE); gtk_box_pack_start (GTK_BOX (vb), hb, FALSE, FALSE, 0); @@ -779,6 +803,7 @@ CloneTiler::CloneTiler () : auto table = gtk_grid_new(); gtk_grid_set_row_spacing(GTK_GRID(table), 4); gtk_grid_set_column_spacing(GTK_GRID(table), 6); + gtk_container_set_border_width(GTK_CONTAINER(table), 4); gtk_container_add(GTK_CONTAINER(frame), table); Gtk::RadioButtonGroup rb_group; @@ -848,7 +873,7 @@ CloneTiler::CloneTiler () : auto table = gtk_grid_new(); gtk_grid_set_row_spacing(GTK_GRID(table), 4); gtk_grid_set_column_spacing(GTK_GRID(table), 6); - + gtk_container_set_border_width(GTK_CONTAINER(table), 4); gtk_container_add(GTK_CONTAINER(frame), table); { @@ -891,6 +916,7 @@ CloneTiler::CloneTiler () : auto table = gtk_grid_new(); gtk_grid_set_row_spacing(GTK_GRID(table), 4); gtk_grid_set_column_spacing(GTK_GRID(table), 6); + gtk_container_set_border_width(GTK_CONTAINER(table), 4); gtk_container_add(GTK_CONTAINER(frame), table); { @@ -969,7 +995,6 @@ CloneTiler::CloneTiler () : { auto l = Gtk::manage(new Gtk::Label("")); l->set_markup("×"); - l->set_halign(Gtk::ALIGN_END); _rowscols->pack_start(*l, true, true, 0); } @@ -1017,7 +1042,6 @@ CloneTiler::CloneTiler () : { auto l = Gtk::manage(new Gtk::Label("")); l->set_markup("×"); - l->set_halign(Gtk::ALIGN_END); _widthheight->pack_start(*l, true, true, 0); } @@ -1110,7 +1134,7 @@ CloneTiler::CloneTiler () : } { // buttons which are enabled only when there are tiled clones - auto sb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + auto sb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); gtk_box_set_homogeneous(GTK_BOX(sb), FALSE); gtk_box_pack_end (GTK_BOX (hb), sb, FALSE, FALSE, 0); _buttons_on_tiles = sb; @@ -2520,7 +2544,7 @@ Gtk::Widget * CloneTiler::checkbox(const char *tip, auto const value = prefs->getBool(prefs_path + attr); b->set_active(value); - hb->pack_end(*b, false, true); + hb->pack_start(*b, false, true); b->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::checkbox_toggled), b, attr)); b->set_data("uncheckable", GINT_TO_POINTER(true)); @@ -2581,8 +2605,6 @@ Gtk::Widget * CloneTiler::spinbox(const char *tip, { auto l = Gtk::manage(new Gtk::Label("")); l->set_markup(suffix); - l->set_halign(Gtk::ALIGN_END); - l->set_valign(Gtk::ALIGN_START); hb->pack_start(*l); } @@ -2661,7 +2683,7 @@ void CloneTiler::table_attach(GtkWidget *table, Gtk::Widget *widget, float align void CloneTiler::table_attach(GtkWidget *table, GtkWidget *widget, float align, int row, int col) { gtk_widget_set_halign(widget, GTK_ALIGN_FILL); - gtk_widget_set_valign(widget, GTK_ALIGN_START); + gtk_widget_set_valign(widget, GTK_ALIGN_CENTER); gtk_grid_attach(GTK_GRID(table), widget, col, row, 1, 1); } diff --git a/src/ui/dialog/document-metadata.cpp b/src/ui/dialog/document-metadata.cpp index 56a75b7d2..a4c2707f1 100644 --- a/src/ui/dialog/document-metadata.cpp +++ b/src/ui/dialog/document-metadata.cpp @@ -64,8 +64,8 @@ DocumentMetadata::DocumentMetadata() _getContents()->set_spacing (4); _getContents()->pack_start(_notebook, true, true); - _page_metadata1.set_border_width(2); - _page_metadata2.set_border_width(2); + _page_metadata1.set_border_width(4); + _page_metadata2.set_border_width(4); _page_metadata1.set_column_spacing(2); _page_metadata2.set_column_spacing(2); @@ -115,7 +115,7 @@ DocumentMetadata::build_metadata() label->set_halign(Gtk::ALIGN_START); label->set_valign(Gtk::ALIGN_CENTER); - _page_metadata1.attach(*label, 0, 0, 3, 1); + _page_metadata1.attach(*label, 0, 0, 2, 1); /* add generic metadata entry areas */ struct rdf_work_entity_t * entity; @@ -124,19 +124,14 @@ DocumentMetadata::build_metadata() if ( entity->editable == RDF_EDIT_GENERIC ) { EntityEntry *w = EntityEntry::create (entity, _wr); _rdflist.push_back (w); - Gtk::HBox *space = Gtk::manage (new Gtk::HBox); - space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); - - space->set_valign(Gtk::ALIGN_CENTER); - _page_metadata1.attach(*space, 0, row, 1, 1); w->_label.set_halign(Gtk::ALIGN_START); w->_label.set_valign(Gtk::ALIGN_CENTER); - _page_metadata1.attach(w->_label, 1, row, 1, 1); + _page_metadata1.attach(w->_label, 0, row, 1, 1); w->_packable->set_hexpand(); w->_packable->set_valign(Gtk::ALIGN_CENTER); - _page_metadata1.attach(*w->_packable, 2, row, 1, 1); + _page_metadata1.attach(*w->_packable, 1, row, 1, 1); } } @@ -147,19 +142,15 @@ DocumentMetadata::build_metadata() llabel->set_markup (_("<b>License</b>")); llabel->set_halign(Gtk::ALIGN_START); llabel->set_valign(Gtk::ALIGN_CENTER); - _page_metadata2.attach(*llabel, 0, row, 3, 1); + _page_metadata2.attach(*llabel, 0, row, 2, 1); /* add license selector pull-down and URI */ ++row; _licensor.init (_wr); - Gtk::HBox *space = Gtk::manage (new Gtk::HBox); - space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); - space->set_valign(Gtk::ALIGN_CENTER); - _page_metadata2.attach(*space, 0, row, 1, 1); _licensor.set_hexpand(); _licensor.set_valign(Gtk::ALIGN_CENTER); - _page_metadata2.attach(_licensor, 1, row, 2, 1); + _page_metadata2.attach(_licensor, 1, row, 1, 1); } /** diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 6e3878164..9e212b193 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -205,11 +205,13 @@ DocumentProperties::~DocumentProperties() //======================================================================== /** - * Helper function that attaches widgets in a 3xn table. The widgets come in an - * array that has two entries per table row. The two entries code for four - * possible cases: (0,0) means insert space in first column; (0, non-0) means - * widget in columns 2-3; (non-0, 0) means label in columns 1-3; and - * (non-0, non-0) means two widgets in columns 2 and 3. + * Helper function that sets widgets in a 2 by n table. + * arr has two entries per table row. Each row is in the following form: + * widget, widget -> function adds a widget in each column. + * nullptr, widget -> function adds a widget that occupies the row. + * label, nullptr -> function adds label that occupies the row. + * nullptr, nullptr -> function adds an empty box that occupies the row. + * This used to be a helper function for a 3 by n table */ void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned const n) { @@ -219,8 +221,8 @@ void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned const n) arr[i+1]->set_hexpand(); arr[i]->set_valign(Gtk::ALIGN_CENTER); arr[i+1]->set_valign(Gtk::ALIGN_CENTER); - table.attach(*arr[i], 1, r, 1, 1); - table.attach(*arr[i+1], 2, r, 1, 1); + table.attach(*arr[i], 0, r, 1, 1); + table.attach(*arr[i+1], 1, r, 1, 1); } else { if (arr[i+1]) { Gtk::AttachOptions yoptions = (Gtk::AttachOptions)0; @@ -235,14 +237,14 @@ void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned const n) else arr[i+1]->set_valign(Gtk::ALIGN_CENTER); - table.attach(*arr[i+1], 1, r, 2, 1); + table.attach(*arr[i+1], 0, r, 2, 1); } else if (arr[i]) { Gtk::Label& label = reinterpret_cast<Gtk::Label&>(*arr[i]); label.set_hexpand(); label.set_halign(Gtk::ALIGN_START); label.set_valign(Gtk::ALIGN_CENTER); - table.attach(label, 0, r, 3, 1); + table.attach(label, 0, r, 2, 1); } else { auto space = Gtk::manage (new Gtk::Box); space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); @@ -330,6 +332,20 @@ void DocumentProperties::build_guides() Gtk::Label *label_gui = Gtk::manage (new Gtk::Label); label_gui->set_markup (_("<b>Guides</b>")); +#if GTK_CHECK_VERSION(3,12,0) + _rum_deflt.set_margin_start(0); + _rcp_bg.set_margin_start(0); + _rcp_bord.set_margin_start(0); + _rcp_gui.set_margin_start(0); + _rcp_hgui.set_margin_start(0); +#else + _rum_deflt.set_margin_left(0); + _rcp_bg.set_margin_left(0); + _rcp_bord.set_margin_left(0); + _rcp_gui.set_margin_left(0); + _rcp_hgui.set_margin_left(0); +#endif + _rcp_gui.set_hexpand(); _rcp_hgui.set_hexpand(); _rcb_sgui.set_hexpand(); @@ -977,7 +993,7 @@ void DocumentProperties::build_metadata() label->set_markup (_("<b>Dublin Core Entities</b>")); label->set_halign(Gtk::ALIGN_START); label->set_valign(Gtk::ALIGN_CENTER); - _page_metadata1->table().attach (*label, 0,0,3,1); + _page_metadata1->table().attach (*label, 0,0,2,1); /* add generic metadata entry areas */ struct rdf_work_entity_t * entity; @@ -986,18 +1002,14 @@ void DocumentProperties::build_metadata() if ( entity->editable == RDF_EDIT_GENERIC ) { EntityEntry *w = EntityEntry::create (entity, _wr); _rdflist.push_back (w); - Gtk::HBox *space = Gtk::manage (new Gtk::HBox); - space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); - space->set_valign(Gtk::ALIGN_CENTER); - _page_metadata1->table().attach(*space, 0, row, 1, 1); w->_label.set_halign(Gtk::ALIGN_START); w->_label.set_valign(Gtk::ALIGN_CENTER); - _page_metadata1->table().attach(w->_label, 1, row, 1, 1); + _page_metadata1->table().attach(w->_label, 0, row, 1, 1); w->_packable->set_hexpand(); w->_packable->set_valign(Gtk::ALIGN_CENTER); - _page_metadata1->table().attach(*w->_packable, 2, row, 1, 1); + _page_metadata1->table().attach(*w->_packable, 1, row, 1, 1); } } @@ -1024,20 +1036,15 @@ void DocumentProperties::build_metadata() llabel->set_markup (_("<b>License</b>")); llabel->set_halign(Gtk::ALIGN_START); llabel->set_valign(Gtk::ALIGN_CENTER); - _page_metadata2->table().attach(*llabel, 0, row, 3, 1); + _page_metadata2->table().attach(*llabel, 0, row, 2, 1); /* add license selector pull-down and URI */ ++row; _licensor.init (_wr); - Gtk::HBox *space = Gtk::manage (new Gtk::HBox); - space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); - - space->set_valign(Gtk::ALIGN_CENTER); - _page_metadata2->table().attach(*space, 0, row, 1, 1); _licensor.set_hexpand(); _licensor.set_valign(Gtk::ALIGN_CENTER); - _page_metadata2->table().attach(_licensor, 1, row, 3, 1); + _page_metadata2->table().attach(_licensor, 0, row, 2, 1); } void DocumentProperties::addExternalScript(){ diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index d42d537fd..16053238c 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -147,7 +147,7 @@ Export::Export () : pHYs_sb(pHYs_adj, 1.0, 2), antialiasing_label(_("Antialiasing")), antialiasing_cb(), - hide_box(false, 5), + hide_box(false, 3), hide_export(_("Hide all except selected")), closeWhenDone(_("Close when complete")), button_box(false, 3), @@ -276,7 +276,7 @@ Export::Export () : 0.01, 100000.0, 0.1, 1.0, t, 3, 1, "", _("dpi"), 2, 0, nullptr ); - singleexport_box.pack_start(size_box); + singleexport_box.pack_start(size_box, Gtk::PACK_SHRINK); } /* File entry */ @@ -295,7 +295,7 @@ Export::Export () : browser_im_label->pack_start(browse_image); browser_im_label->pack_start(browse_label); browse_button.add(*browser_im_label); - filename_box.pack_end (browse_button, false, false, 4); + filename_box.pack_end (browse_button, false, false); file_box.add(filename_box); @@ -307,29 +307,30 @@ Export::Export () : // mnemonic in frame label moves focus to filename: flabel->set_mnemonic_widget(filename_entry); - singleexport_box.pack_start(file_box); + singleexport_box.pack_start(file_box, Gtk::PACK_SHRINK); } batch_export.set_sensitive(true); - batch_box.pack_start(batch_export, false, false); + batch_box.pack_start(batch_export, false, false, 3); hide_export.set_sensitive(true); hide_export.set_active (prefs->getBool("/dialogs/export/hideexceptselected/value", false)); - hide_box.pack_start(hide_export, false, false); + hide_box.pack_start(hide_export, false, false, 3); /* Export Button row */ - button_box.set_border_width(3); export_button.set_label(_("_Export")); export_button.set_use_underline(); export_button.set_tooltip_text (_("Export the bitmap file with these settings")); - button_box.pack_start(closeWhenDone, true, true, 0 ); + button_box.set_border_width(3); + button_box.pack_start(closeWhenDone, true, true, 0); button_box.pack_end(export_button, false, false, 0); /*Advanced*/ Gtk::Label *label_advanced = Gtk::manage(new Gtk::Label(_("Advanced"),true)); expander.set_label_widget(*label_advanced); + expander.set_vexpand(false); const char* const modes_list[]={"Gray_1", "Gray_2","Gray_4","Gray_8","Gray_16","RGB_8","RGB_16","GrayAlpha_8","GrayAlpha_16","RGBA_8","RGBA_16"}; for(auto i : modes_list) bitdepth_cb.append(i); @@ -348,8 +349,14 @@ Export::Export () : for(auto i : antialising_list) antialiasing_cb.append(i); antialiasing_cb.set_active_text(antialising_list[2]); + bitdepth_label.set_halign(Gtk::ALIGN_START); + zlib_label.set_halign(Gtk::ALIGN_START); + pHYs_label.set_halign(Gtk::ALIGN_START); + antialiasing_label.set_halign(Gtk::ALIGN_START); auto table = new Gtk::Grid(); - gtk_container_add(GTK_CONTAINER(expander.gobj()), (GtkWidget*)(table->gobj())); + expander.add(*table); + // gtk_container_add(GTK_CONTAINER(expander.gobj()), (GtkWidget*)(table->gobj())); + table->set_border_width(4); table->attach(interlacing,0,0,1,1); table->attach(bitdepth_label,0,1,1,1); table->attach(bitdepth_cb,1,1,1,1); @@ -364,12 +371,12 @@ Export::Export () : /* Main dialog */ Gtk::Box *contents = _getContents(); contents->set_spacing(0); - contents->pack_start(singleexport_box); - contents->pack_start(batch_box); - contents->pack_start(hide_box); - contents->pack_end(button_box, false, false); - contents->pack_end(_prog, Gtk::PACK_EXPAND_WIDGET); - contents->pack_end(expander, FALSE, FALSE,0); + contents->pack_start(singleexport_box, Gtk::PACK_SHRINK); + contents->pack_start(batch_box, Gtk::PACK_SHRINK); + contents->pack_start(hide_box, Gtk::PACK_SHRINK); + contents->pack_start(expander, Gtk::PACK_SHRINK); + contents->pack_end(button_box, Gtk::PACK_SHRINK); + contents->pack_end(_prog, Gtk::PACK_SHRINK); /* Signal handlers */ filename_entry.signal_changed().connect( sigc::mem_fun(*this, &Export::onFilenameModified) ); @@ -507,7 +514,6 @@ Glib::RefPtr<Gtk::Adjustment> Export::createSpinbutton( gchar const * /*key*/, f 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); l->set_sensitive(sensitive); pos++; @@ -515,7 +521,6 @@ Glib::RefPtr<Gtk::Adjustment> Export::createSpinbutton( gchar const * /*key*/, f auto sb = new Gtk::SpinButton(adj, 1.0, digits); sb->set_hexpand(); - sb->set_vexpand(); t->attach(*sb, x + pos, y, 1, 1); sb->set_width_chars(7); @@ -531,7 +536,6 @@ Glib::RefPtr<Gtk::Adjustment> Export::createSpinbutton( gchar const * /*key*/, f 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); l->set_sensitive (sensitive); pos++; diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp index 5cc7c48e6..2ac87186e 100644 --- a/src/ui/dialog/fill-and-stroke.cpp +++ b/src/ui/dialog/fill-and-stroke.cpp @@ -143,7 +143,7 @@ FillAndStroke::_layoutPageStrokeStyle() { strokeStyleWdgt = sp_stroke_style_line_widget_new(); strokeStyleWdgt->set_hexpand(); - strokeStyleWdgt->set_halign(Gtk::ALIGN_CENTER); + strokeStyleWdgt->set_halign(Gtk::ALIGN_START); _page_stroke_style->table().attach(*strokeStyleWdgt, 0, 0, 1, 1); } diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 2945e8a0b..6cddf05cf 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -23,6 +23,7 @@ #include <gtkmm/checkbutton.h> #include <gtkmm/colorbutton.h> #include <gtkmm/eventbox.h> +#include <gtkmm/sizegroup.h> #if GTK_CHECK_VERSION(3, 20, 0) # include <gdkmm/seat.h> #else @@ -207,9 +208,11 @@ public: { g_assert(attrs.size()==default_values.size()); g_assert(attrs.size()==tip_text.size()); + set_spacing(4); for(unsigned i = 0; i < attrs.size(); ++i) { - _spins.push_back(new SpinButtonAttr(lower, upper, step_inc, climb_rate, digits, attrs[i], default_values[i], tip_text[i])); - pack_start(*_spins.back(), false, false); + unsigned index = attrs.size() - 1 - i; + _spins.push_back(new SpinButtonAttr(lower, upper, step_inc, climb_rate, digits, attrs[index], default_values[index], tip_text[index])); + pack_end(*_spins.back(), false, false); } } @@ -250,6 +253,7 @@ public: _s1.signal_value_changed().connect(signal_attr_changed().make_slot()); _s2.signal_value_changed().connect(signal_attr_changed().make_slot()); + set_spacing(4); pack_start(_s1, false, false); pack_start(_s2, false, false); } @@ -741,8 +745,9 @@ public: _size_group = Gtk::SizeGroup::create(Gtk::SIZE_GROUP_HORIZONTAL); for(int i = 0; i < _max_types; ++i) { - _groups[i] = new Gtk::VBox; - b.pack_start(*_groups[i], false, false); + _groups[i] = new Gtk::VBox(false, 3); + b.set_spacing(4); + b.pack_start(*_groups[i], Gtk::PACK_SHRINK); } //_current_type = 0; If set to 0 then update_and_show() fails to update properly. } @@ -967,6 +972,7 @@ public: return entry; } + Glib::RefPtr<Gtk::SizeGroup> _size_group; private: void add_attr_widget(AttrWidget* a) { @@ -982,20 +988,17 @@ private: hb->set_spacing(12); if(label != "") { - Gtk::Label *lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_START)); - hb->pack_start(*lbl, false, false); + Gtk::Label *lbl = Gtk::manage(new Gtk::Label(label, 0.0, 0.5)); + hb->pack_start(*lbl, Gtk::PACK_SHRINK); _size_group->add_widget(*lbl); - lbl->show(); } - hb->pack_start(*w); - _groups[_current_type]->pack_start(*hb); - hb->show(); - w->show(); + hb->pack_start(*w, Gtk::PACK_EXPAND_WIDGET); + _groups[_current_type]->pack_start(*hb, Gtk::PACK_EXPAND_WIDGET); + hb->show_all(); } std::vector<Gtk::VBox*> _groups; - Glib::RefPtr<Gtk::SizeGroup> _size_group; FilterEffectsDialog& _dialog; SetAttrSlot _set_attr_slot; std::vector<std::vector< AttrWidget*> > _attrwidgets; @@ -1157,15 +1160,15 @@ public: : AttrWidget(SP_ATTR_INVALID), _dialog(d), _settings(d, _box, sigc::mem_fun(_dialog, &FilterEffectsDialog::set_child_attr_direct), LIGHT_ENDSOURCE), - _light_label(_("Light Source:"), Gtk::ALIGN_START), + _light_label(_("Light Source:"), 0.0, 0.5), _light_source(LightSourceConverter), _locked(false) { - _light_box.pack_start(_light_label, false, false); - _light_box.pack_start(_light_source); + _settings._size_group->add_widget(_light_label); + _light_box.pack_start(_light_label, Gtk::PACK_SHRINK); + _light_box.pack_start(_light_source, Gtk::PACK_EXPAND_WIDGET); _light_box.show_all(); _light_box.set_spacing(12); - _dialog._sizegroup->add_widget(_light_label); _box.add(_light_box); _box.reorder_child(_light_box, 0); @@ -1174,8 +1177,8 @@ public: // FIXME: these range values are complete crap _settings.type(LIGHT_DISTANT); - _settings.add_spinscale(0, SP_ATTR_AZIMUTH, _("Azimuth"), 0, 360, 1, 1, 0, _("Direction angle for the light source on the XY plane, in degrees")); - _settings.add_spinscale(0, SP_ATTR_ELEVATION, _("Elevation"), 0, 360, 1, 1, 0, _("Direction angle for the light source on the YZ plane, in degrees")); + _settings.add_spinscale(0, SP_ATTR_AZIMUTH, _("Azimuth:"), 0, 360, 1, 1, 0, _("Direction angle for the light source on the XY plane, in degrees")); + _settings.add_spinscale(0, SP_ATTR_ELEVATION, _("Elevation:"), 0, 360, 1, 1, 0, _("Direction angle for the light source on the YZ plane, in degrees")); _settings.type(LIGHT_POINT); _settings.add_multispinbutton(/*default x:*/ (double) 0, /*default y:*/ (double) 0, /*default z:*/ (double) 0, SP_ATTR_X, SP_ATTR_Y, SP_ATTR_Z, _("Location:"), -99999, 99999, 1, 100, 0, _("X coordinate"), _("Y coordinate"), _("Z coordinate")); @@ -1184,10 +1187,10 @@ public: _settings.add_multispinbutton(/*default x:*/ (double) 0, /*default y:*/ (double) 0, /*default z:*/ (double) 0, SP_ATTR_X, SP_ATTR_Y, SP_ATTR_Z, _("Location:"), -99999, 99999, 1, 100, 0, _("X coordinate"), _("Y coordinate"), _("Z coordinate")); _settings.add_multispinbutton(/*default x:*/ (double) 0, /*default y:*/ (double) 0, /*default z:*/ (double) 0, SP_ATTR_POINTSATX, SP_ATTR_POINTSATY, SP_ATTR_POINTSATZ, - _("Points At"), -99999, 99999, 1, 100, 0, _("X coordinate"), _("Y coordinate"), _("Z coordinate")); - _settings.add_spinscale(1, SP_ATTR_SPECULAREXPONENT, _("Specular Exponent"), 1, 100, 1, 1, 0, _("Exponent value controlling the focus for the light source")); + _("Points At:"), -99999, 99999, 1, 100, 0, _("X coordinate"), _("Y coordinate"), _("Z coordinate")); + _settings.add_spinscale(1, SP_ATTR_SPECULAREXPONENT, _("Specular Exponent:"), 1, 100, 1, 1, 0, _("Exponent value controlling the focus for the light source")); //TODO: here I have used 100 degrees as default value. But spec says that if not specified, no limiting cone is applied. So, there should be a way for the user to set a "no limiting cone" option. - _settings.add_spinscale(100, SP_ATTR_LIMITINGCONEANGLE, _("Cone Angle"), 1, 100, 1, 1, 0, _("This is the angle between the spot light axis (i.e. the axis between the light source and the point to which it is pointing at) and the spot light cone. No light is projected outside this cone.")); + _settings.add_spinscale(100, SP_ATTR_LIMITINGCONEANGLE, _("Cone Angle:"), 1, 100, 1, 1, 0, _("This is the angle between the spot light axis (i.e. the axis between the light source and the point to which it is pointing at) and the spot light cone. No light is projected outside this cone.")); _settings.type(-1); // Force update_and_show() to show/hide windows correctly @@ -2642,7 +2645,6 @@ FilterEffectsDialog::FilterEffectsDialog() NR_FILTER_ENDPRIMITIVETYPE); _filter_general_settings = new Settings(*this, _settings_tab2, sigc::mem_fun(*this, &FilterEffectsDialog::set_filternode_attr), 1); - _sizegroup = Gtk::SizeGroup::create(Gtk::SIZE_GROUP_HORIZONTAL); // Initialize widget hierarchy auto hpaned = Gtk::manage(new Gtk::Paned()); @@ -2696,8 +2698,6 @@ FilterEffectsDialog::FilterEffectsDialog() _getContents()->pack_start(_settings_tabs, false, false); _settings_tabs.append_page(_settings_tab1, _("Effect parameters")); _settings_tabs.append_page(_settings_tab2, _("Filter General Settings")); - - _primitive_list.signal_primitive_changed().connect( sigc::mem_fun(*this, &FilterEffectsDialog::update_settings_view)); @@ -2747,6 +2747,9 @@ void FilterEffectsDialog::init_settings_widgets() // TODO: Find better range/climb-rate/digits values for the SpinScales, // most of the current values are complete guesses! + _settings_tab1.set_border_width(4); + _settings_tab2.set_border_width(4); + _empty_settings.set_sensitive(false); _settings_tab1.pack_start(_empty_settings); diff --git a/src/ui/dialog/filter-effects-dialog.h b/src/ui/dialog/filter-effects-dialog.h index 4f67148b0..6f86df797 100644 --- a/src/ui/dialog/filter-effects-dialog.h +++ b/src/ui/dialog/filter-effects-dialog.h @@ -18,7 +18,6 @@ #include <memory> #include <gtkmm/notebook.h> -#include <gtkmm/sizegroup.h> #include <gtkmm/paned.h> #include <gtkmm/scrolledwindow.h> @@ -296,7 +295,6 @@ private: class LightSourceControl; Settings* _settings; Settings* _filter_general_settings; - Glib::RefPtr<Gtk::SizeGroup> _sizegroup; // Color Matrix ColorMatrixValues* _color_matrix_values; diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp index 0db33903a..402ccd46d 100644 --- a/src/ui/dialog/find.cpp +++ b/src/ui/dialog/find.cpp @@ -108,6 +108,8 @@ Find::Find() deskTrack() { + _left_size_group = Gtk::SizeGroup::create(Gtk::SIZE_GROUP_HORIZONTAL); + _right_size_group = Gtk::SizeGroup::create(Gtk::SIZE_GROUP_HORIZONTAL); button_find.set_use_underline(); button_find.set_tooltip_text(_("Select all objects matching the selection criteria")); button_replace.set_use_underline(); @@ -192,68 +194,92 @@ Find::Find() Gtk::RadioButtonGroup grp_searchin = check_searchin_text.get_group(); check_searchin_property.set_group(grp_searchin); - vbox_searchin.pack_start(check_searchin_text, false, false); - vbox_searchin.pack_start(check_searchin_property, false, false); + vbox_searchin.pack_start(check_searchin_text, Gtk::PACK_SHRINK); + vbox_searchin.pack_start(check_searchin_property, Gtk::PACK_SHRINK); frame_searchin.add(vbox_searchin); Gtk::RadioButtonGroup grp_scope = check_scope_all.get_group(); check_scope_layer.set_group(grp_scope); check_scope_selection.set_group(grp_scope); - vbox_scope.pack_start(check_scope_all, true, true); - vbox_scope.pack_start(check_scope_layer, true, true); - vbox_scope.pack_start(check_scope_selection, true, true); + vbox_scope.pack_start(check_scope_all, Gtk::PACK_SHRINK); + vbox_scope.pack_start(check_scope_layer, Gtk::PACK_SHRINK); + vbox_scope.pack_start(check_scope_selection, Gtk::PACK_SHRINK); + hbox_searchin.set_spacing(12); + hbox_searchin.pack_start(frame_searchin, Gtk::PACK_SHRINK); + hbox_searchin.pack_start(frame_scope, Gtk::PACK_SHRINK); frame_scope.add(vbox_scope); - hbox_searchin.set_spacing(4); - hbox_searchin.pack_start(frame_searchin, true, true); - hbox_searchin.pack_start(frame_scope, true, true); - - vbox_options1.pack_start(check_case_sensitive, true, true); - vbox_options1.pack_start(check_include_hidden, true, true); - vbox_options2.pack_start(check_exact_match, true, true); - vbox_options2.pack_start(check_include_locked, true, true); - hbox_options.pack_start(vbox_options1, true, true, 4); - hbox_options.pack_start(vbox_options2, true, true, 4); + vbox_options1.pack_start(check_case_sensitive, Gtk::PACK_SHRINK); + vbox_options1.pack_start(check_include_hidden, Gtk::PACK_SHRINK); + vbox_options2.pack_start(check_exact_match, Gtk::PACK_SHRINK); + vbox_options2.pack_start(check_include_locked, Gtk::PACK_SHRINK); + _left_size_group->add_widget(check_case_sensitive); + _left_size_group->add_widget(check_include_hidden); + _right_size_group->add_widget(check_exact_match); + _right_size_group->add_widget(check_include_locked); + hbox_options.set_spacing(4); + hbox_options.pack_start(vbox_options1, Gtk::PACK_SHRINK); + hbox_options.pack_start(vbox_options2, Gtk::PACK_SHRINK); frame_options.add(hbox_options); - vbox_properties1.pack_start(check_ids, true, true); - vbox_properties1.pack_start(check_style, true, true); - vbox_properties1.pack_start(check_font, true, true); - vbox_properties2.pack_start(check_attributevalue, true, true); - vbox_properties2.pack_start(check_attributename, true, true); + vbox_properties1.pack_start(check_ids, Gtk::PACK_SHRINK); + vbox_properties1.pack_start(check_style, Gtk::PACK_SHRINK); + vbox_properties1.pack_start(check_font, Gtk::PACK_SHRINK); + vbox_properties2.pack_start(check_attributevalue, Gtk::PACK_SHRINK); + vbox_properties2.pack_start(check_attributename, Gtk::PACK_SHRINK); vbox_properties2.set_valign(Gtk::ALIGN_START); - hbox_properties.pack_start(vbox_properties1, true, true, 4); - hbox_properties.pack_start(vbox_properties2, true, true, 4); + _left_size_group->add_widget(check_ids); + _left_size_group->add_widget(check_style); + _left_size_group->add_widget(check_font); + _right_size_group->add_widget(check_attributevalue); + _right_size_group->add_widget(check_attributename); + hbox_properties.set_spacing(4); + hbox_properties.pack_start(vbox_properties1, Gtk::PACK_SHRINK); + hbox_properties.pack_start(vbox_properties2, Gtk::PACK_SHRINK); frame_properties.add(hbox_properties); - vbox_types1.pack_start(check_alltypes, true, true); - vbox_types1.pack_start(check_paths, true, true); - vbox_types1.pack_start(check_texts, true, true); - vbox_types1.pack_start(check_groups, true, true); - vbox_types1.pack_start(check_clones, true, true); - vbox_types1.pack_start(check_images, true, true); - vbox_types2.pack_start(check_offsets, true, true); - vbox_types2.pack_start(check_rects, true, true); - vbox_types2.pack_start(check_ellipses, true, true); - vbox_types2.pack_start(check_stars, true, true); - vbox_types2.pack_start(check_spirals, true, true); + vbox_types1.pack_start(check_alltypes, Gtk::PACK_SHRINK); + vbox_types1.pack_start(check_paths, Gtk::PACK_SHRINK); + vbox_types1.pack_start(check_texts, Gtk::PACK_SHRINK); + vbox_types1.pack_start(check_groups, Gtk::PACK_SHRINK); + vbox_types1.pack_start(check_clones, Gtk::PACK_SHRINK); + vbox_types1.pack_start(check_images, Gtk::PACK_SHRINK); + vbox_types2.pack_start(check_offsets, Gtk::PACK_SHRINK); + vbox_types2.pack_start(check_rects, Gtk::PACK_SHRINK); + vbox_types2.pack_start(check_ellipses, Gtk::PACK_SHRINK); + vbox_types2.pack_start(check_stars, Gtk::PACK_SHRINK); + vbox_types2.pack_start(check_spirals, Gtk::PACK_SHRINK); vbox_types2.set_valign(Gtk::ALIGN_END); - hbox_types.pack_start(vbox_types1, true, true, 4); - hbox_types.pack_start(vbox_types2, true, true, 4); + _left_size_group->add_widget(check_alltypes); + _left_size_group->add_widget(check_paths); + _left_size_group->add_widget(check_texts); + _left_size_group->add_widget(check_groups); + _left_size_group->add_widget(check_clones); + _left_size_group->add_widget(check_images); + _right_size_group->add_widget(check_offsets); + _right_size_group->add_widget(check_rects); + _right_size_group->add_widget(check_ellipses); + _right_size_group->add_widget(check_stars); + _right_size_group->add_widget(check_spirals); + hbox_types.set_spacing(4); + hbox_types.pack_start(vbox_types1, Gtk::PACK_SHRINK); + hbox_types.pack_start(vbox_types2, Gtk::PACK_SHRINK); frame_types.add(hbox_types); - vbox_expander.pack_start(frame_options, true, true, 4); - vbox_expander.pack_start(frame_properties, true, true, 4); - vbox_expander.pack_start(frame_types, true, true, 4); + vbox_expander.set_spacing(4); + vbox_expander.pack_start(frame_options, true, true); + vbox_expander.pack_start(frame_properties, true, true); + vbox_expander.pack_start(frame_types, true, true); expander_options.set_use_underline(); expander_options.add(vbox_expander); box_buttons.set_layout(Gtk::BUTTONBOX_END); - box_buttons.set_spacing(4); - box_buttons.pack_start(button_find, true, true, 6); - box_buttons.pack_start(button_replace, true, true, 6); - hboxbutton_row.pack_start(status, true, true, 6); + box_buttons.set_spacing(6); + box_buttons.pack_start(button_find, true, true); + box_buttons.pack_start(button_replace, true, true); + hboxbutton_row.set_spacing(6); + hboxbutton_row.pack_start(status, true, true); hboxbutton_row.pack_end(box_buttons, true, true); Gtk::Box *contents = _getContents(); diff --git a/src/ui/dialog/find.h b/src/ui/dialog/find.h index cffe4d39f..0eeeee0f8 100644 --- a/src/ui/dialog/find.h +++ b/src/ui/dialog/find.h @@ -22,6 +22,7 @@ #include <gtkmm/expander.h> #include <gtkmm/label.h> #include <gtkmm/radiobutton.h> +#include <gtkmm/sizegroup.h> #include "ui/dialog/desktop-tracker.h" @@ -270,6 +271,9 @@ private: Gtk::HBox hbox_types; UI::Widget::Frame frame_types; + Glib::RefPtr<Gtk::SizeGroup> _left_size_group; + Glib::RefPtr<Gtk::SizeGroup> _right_size_group; + /** * A vector of all the check option widgets for easy processing */ diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp index 120e39065..e115dbc56 100644 --- a/src/ui/dialog/glyphs.cpp +++ b/src/ui/dialog/glyphs.cpp @@ -330,6 +330,8 @@ GlyphsPanel::GlyphsPanel() : desktopConns() { auto table = new Gtk::Grid(); + table->set_row_spacing(4); + table->set_column_spacing(4); _getContents()->pack_start(*Gtk::manage(table), Gtk::PACK_EXPAND_WIDGET); guint row = 0; diff --git a/src/ui/dialog/grid-arrange-tab.cpp b/src/ui/dialog/grid-arrange-tab.cpp index 2bef67d42..8b43090c4 100644 --- a/src/ui/dialog/grid-arrange-tab.cpp +++ b/src/ui/dialog/grid-arrange-tab.cpp @@ -739,6 +739,7 @@ GridArrangeTab::GridArrangeTab(ArrangeDialog *parent) TileBox.pack_start(*PaddingTable, false, false, MARGIN); + contents->set_border_width(4); contents->pack_start(TileBox); double SpacingType = prefs->getDouble("/dialogs/gridtiler/SpacingType", 15); diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp index 175d1ca66..98160bd8f 100644 --- a/src/ui/dialog/icon-preview.cpp +++ b/src/ui/dialog/icon-preview.cpp @@ -228,6 +228,7 @@ IconPreviewPanel::IconPreviewPanel() : iconBox.pack_start(splitter); splitter.pack1( *magBox, true, false ); UI::Widget::Frame *actuals = Gtk::manage(new UI::Widget::Frame (_("Actual Size:"))); + actuals->set_border_width(4); actuals->add(*verts); splitter.pack2( *actuals, false, false ); diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp index e1bf1bd1c..654044fee 100644 --- a/src/ui/dialog/input.cpp +++ b/src/ui/dialog/input.cpp @@ -1046,6 +1046,7 @@ InputDialogImpl::ConfPanel::ConfPanel() : detailsBox.pack_start(modeBox, false, false, 6); detailsBox.pack_start(axisFrame, false, false); detailsBox.pack_start(keysFrame, false, false); + detailsBox.set_border_width(4); pack_start(pane, true, true); pack_start(useExt, Gtk::PACK_SHRINK); diff --git a/src/ui/dialog/layer-properties.cpp b/src/ui/dialog/layer-properties.cpp index ddd0fcf7e..083f1049b 100644 --- a/src/ui/dialog/layer-properties.cpp +++ b/src/ui/dialog/layer-properties.cpp @@ -49,11 +49,9 @@ LayerPropertiesDialog::LayerPropertiesDialog() // Layer name widgets _layer_name_entry.set_activates_default(true); _layer_name_label.set_label(_("Layer name:")); - _layer_name_label.set_halign(Gtk::ALIGN_END); + _layer_name_label.set_halign(Gtk::ALIGN_START); _layer_name_label.set_valign(Gtk::ALIGN_CENTER); - _layer_name_label.set_halign(Gtk::ALIGN_FILL); - _layer_name_label.set_valign(Gtk::ALIGN_FILL); _layout_table.attach(_layer_name_label, 0, 0, 1, 1); _layer_name_entry.set_halign(Gtk::ALIGN_FILL); @@ -167,7 +165,7 @@ 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_halign(Gtk::ALIGN_END); + _layer_position_label.set_halign(Gtk::ALIGN_START); _layer_position_label.set_valign(Gtk::ALIGN_CENTER); _layer_position_combo.set_halign(Gtk::ALIGN_FILL); @@ -175,8 +173,6 @@ LayerPropertiesDialog::_setup_position_controls() { _layer_position_combo.set_hexpand(); _layout_table.attach(_layer_position_combo, 1, 1, 1, 1); - _layer_position_label.set_halign(Gtk::ALIGN_FILL); - _layer_position_label.set_valign(Gtk::ALIGN_FILL); _layout_table.attach(_layer_position_label, 0, 1, 1, 1); show_all_children(); diff --git a/src/ui/dialog/polar-arrange-tab.cpp b/src/ui/dialog/polar-arrange-tab.cpp index de026b8d5..7a64b91c6 100644 --- a/src/ui/dialog/polar-arrange-tab.cpp +++ b/src/ui/dialog/polar-arrange-tab.cpp @@ -114,6 +114,8 @@ PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_) angleY.setValue(180, "°"); parametersTable.attach(angleX, 1, 2, 1, 1); parametersTable.attach(angleY, 2, 2, 1, 1); + parametersTable.set_row_spacing(4); + parametersTable.set_column_spacing(4); pack_start(parametersTable, false, false); rotateObjectsCheckBox.set_label(_("Rotate objects")); @@ -126,6 +128,8 @@ PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_) angleY.set_sensitive(false); radiusX.set_sensitive(false); radiusY.set_sensitive(false); + + set_border_width(4); } /** diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index 17eec56d2..ee89ddd86 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -106,8 +106,8 @@ SvgFontsDialog::AttrEntry::AttrEntry(SvgFontsDialog* d, gchar* lbl, Glib::ustrin this->attr = attr; entry.set_tooltip_text(tooltip); auto label = new Gtk::Label(lbl); - this->add(*Gtk::manage(label)); - this->add(entry); + this->pack_start(*Gtk::manage(label), false, false, 4); + this->pack_end(entry, true, true); this->show_all(); entry.signal_changed().connect(sigc::mem_fun(*this, &SvgFontsDialog::AttrEntry::on_attr_changed)); @@ -153,8 +153,11 @@ SvgFontsDialog::AttrSpin::AttrSpin(SvgFontsDialog* d, gchar* lbl, Glib::ustring this->dialog = d; this->attr = attr; spin.set_tooltip_text(tooltip); - this->add(* Gtk::manage(new Gtk::Label(lbl)) ); - this->add(spin); + auto label = new Gtk::Label(lbl); + this->set_border_width(2); + this->set_spacing(6); + this->pack_start(*Gtk::manage(label), false, false); + this->pack_end(spin, true, true); this->show_all(); spin.set_range(0, 4096); spin.set_increments(16, 0); @@ -462,11 +465,11 @@ SPGlyph* SvgFontsDialog::get_selected_glyph() } Gtk::VBox* SvgFontsDialog::global_settings_tab(){ - _font_label = new Gtk::Label( _("Font Attributes") ); + _font_label = new Gtk::Label(Glib::ustring("<b>") + _("Font Attributes") + "</b>", Gtk::ALIGN_START, Gtk::ALIGN_CENTER); _horiz_adv_x_spin = new AttrSpin( this, (gchar*) _("Horiz. Advance X"), _("Average amount of horizontal space each letter takes up."), SP_ATTR_HORIZ_ADV_X); _horiz_origin_x_spin = new AttrSpin( this, (gchar*) _("Horiz. Origin X"), _("Average horizontal origin location for each letter."), SP_ATTR_HORIZ_ORIGIN_X); _horiz_origin_y_spin = new AttrSpin( this, (gchar*) _("Horiz. Origin Y"), _("Average vertical origin location for each letter."), SP_ATTR_HORIZ_ORIGIN_Y); - _font_face_label = new Gtk::Label( _("Font Face Attributes") ); + _font_face_label = new Gtk::Label(Glib::ustring("<b>") + _("Font Face Attributes") + "</b>", Gtk::ALIGN_START, Gtk::ALIGN_CENTER); _familyname_entry = new AttrEntry(this, (gchar*) _("Family Name:"), _("Name of the font as it appears in font selectors and css font-family properties."), SP_PROP_FONT_FAMILY); _units_per_em_spin = new AttrSpin( this, (gchar*) _("Units per em"), _("Number of display units each letter takes up."), SP_ATTR_UNITS_PER_EM); _ascent_spin = new AttrSpin( this, (gchar*) _("Ascent:"), _("Amount of space taken up by accenders like the tall line on the letter 'h'."), SP_ATTR_ASCENT); @@ -475,18 +478,21 @@ Gtk::VBox* SvgFontsDialog::global_settings_tab(){ _x_height_spin = new AttrSpin( this, (gchar*) _("x Height:"), _("The height of a lower-case letter above the baseline like the letter 'x'."), SP_ATTR_X_HEIGHT); //_descent_spin->set_range(-4096,0); - - global_vbox.pack_start(*_font_label, false, false); - global_vbox.pack_start(*_horiz_adv_x_spin, false, false); - global_vbox.pack_start(*_horiz_origin_x_spin, false, false); - global_vbox.pack_start(*_horiz_origin_y_spin, false, false); - global_vbox.pack_start(*_font_face_label, false, false); - global_vbox.pack_start(*_familyname_entry, false, false); - global_vbox.pack_start(*_units_per_em_spin, false, false); - global_vbox.pack_start(*_ascent_spin, false, false); - global_vbox.pack_start(*_descent_spin, false, false); - global_vbox.pack_start(*_cap_height_spin, false, false); - global_vbox.pack_start(*_x_height_spin, false, false); + _font_label->set_use_markup(); + _font_face_label->set_use_markup(); + + global_vbox.set_border_width(2); + global_vbox.pack_start(*_font_label); + global_vbox.pack_start(*_horiz_adv_x_spin); + global_vbox.pack_start(*_horiz_origin_x_spin); + global_vbox.pack_start(*_horiz_origin_y_spin); + global_vbox.pack_start(*_font_face_label); + global_vbox.pack_start(*_familyname_entry); + global_vbox.pack_start(*_units_per_em_spin); + global_vbox.pack_start(*_ascent_spin); + global_vbox.pack_start(*_descent_spin); + global_vbox.pack_start(*_cap_height_spin); + global_vbox.pack_start(*_x_height_spin); /* global_vbox->add(*AttrCombo((gchar*) _("Style:"), SP_PROP_FONT_STYLE)); global_vbox->add(*AttrCombo((gchar*) _("Variant:"), SP_PROP_FONT_VARIANT)); @@ -796,28 +802,32 @@ Gtk::VBox* SvgFontsDialog::glyphs_tab(){ _GlyphsList.signal_button_release_event().connect_notify(sigc::mem_fun(*this, &SvgFontsDialog::glyphs_list_button_release)); create_glyphs_popup_menu(_GlyphsList, sigc::mem_fun(*this, &SvgFontsDialog::remove_selected_glyph)); - Gtk::HBox* missing_glyph_hbox = Gtk::manage(new Gtk::HBox()); + Gtk::HBox* missing_glyph_hbox = Gtk::manage(new Gtk::HBox(false, 4)); Gtk::Label* missing_glyph_label = Gtk::manage(new Gtk::Label(_("Missing Glyph:"))); + missing_glyph_hbox->set_hexpand(false); missing_glyph_hbox->pack_start(*missing_glyph_label, false,false); missing_glyph_hbox->pack_start(missing_glyph_button, false,false); missing_glyph_hbox->pack_start(missing_glyph_reset_button, false,false); + missing_glyph_button.set_label(_("From selection...")); missing_glyph_button.signal_clicked().connect(sigc::mem_fun(*this, &SvgFontsDialog::missing_glyph_description_from_selected_path)); missing_glyph_reset_button.set_label(_("Reset")); missing_glyph_reset_button.signal_clicked().connect(sigc::mem_fun(*this, &SvgFontsDialog::reset_missing_glyph_description)); + glyphs_vbox.set_border_width(4); + glyphs_vbox.set_spacing(4); glyphs_vbox.pack_start(*missing_glyph_hbox, false,false); glyphs_vbox.add(_GlyphsListScroller); _GlyphsListScroller.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_ALWAYS); - _GlyphsListScroller.set_size_request(-1, 290);//It seems that is does not work. Why? I want a box with larger height + _GlyphsListScroller.set_size_request(-1, 290); _GlyphsListScroller.add(_GlyphsList); _GlyphsListStore = Gtk::ListStore::create(_GlyphsListColumns); _GlyphsList.set_model(_GlyphsListStore); _GlyphsList.append_column_editable(_("Glyph name"), _GlyphsListColumns.glyph_name); _GlyphsList.append_column_editable(_("Matching string"), _GlyphsListColumns.unicode); _GlyphsList.append_column_numeric_editable(_("Advance"), _GlyphsListColumns.advance, "%.2f"); - Gtk::HBox* hb = Gtk::manage(new Gtk::HBox()); + Gtk::HBox* hb = Gtk::manage(new Gtk::HBox(false, 4)); add_glyph_button.set_label(_("Add Glyph")); add_glyph_button.signal_clicked().connect(sigc::mem_fun(*this, &SvgFontsDialog::add_glyph)); @@ -885,13 +895,15 @@ Gtk::VBox* SvgFontsDialog::kerning_tab(){ create_kerning_pairs_popup_menu(_KerningPairsList, sigc::mem_fun(*this, &SvgFontsDialog::remove_selected_kerning_pair)); //Kerning Setup: - kerning_vbox.add(*Gtk::manage(new Gtk::Label(_("Kerning Setup")))); + kerning_vbox.set_border_width(4); + kerning_vbox.set_spacing(4); + // kerning_vbox.add(*Gtk::manage(new Gtk::Label(_("Kerning Setup")))); Gtk::HBox* kerning_selector = Gtk::manage(new Gtk::HBox()); - kerning_selector->add(*Gtk::manage(new Gtk::Label(_("1st Glyph:")))); - kerning_selector->add(first_glyph); - kerning_selector->add(*Gtk::manage(new Gtk::Label(_("2nd Glyph:")))); - kerning_selector->add(second_glyph); - kerning_selector->add(add_kernpair_button); + kerning_selector->pack_start(*Gtk::manage(new Gtk::Label(_("1st Glyph:"))), false, false); + kerning_selector->pack_start(first_glyph, true, true, 4); + kerning_selector->pack_start(*Gtk::manage(new Gtk::Label(_("2nd Glyph:"))), false, false); + kerning_selector->pack_start(second_glyph, true, true, 4); + kerning_selector->pack_start(add_kernpair_button, true, true); add_kernpair_button.set_label(_("Add pair")); add_kernpair_button.signal_clicked().connect(sigc::mem_fun(*this, &SvgFontsDialog::add_kerning_pair)); _KerningPairsList.get_selection()->signal_changed().connect(sigc::mem_fun(*this, &SvgFontsDialog::on_kerning_pair_selection_changed)); @@ -899,7 +911,7 @@ Gtk::VBox* SvgFontsDialog::kerning_tab(){ kerning_vbox.pack_start(*kerning_selector, false,false); - kerning_vbox.add(_KerningPairsListScroller); + kerning_vbox.pack_start(_KerningPairsListScroller, true,true); _KerningPairsListScroller.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_ALWAYS); _KerningPairsListScroller.add(_KerningPairsList); _KerningPairsListStore = Gtk::ListStore::create(_KerningPairsListColumns); @@ -908,12 +920,13 @@ Gtk::VBox* SvgFontsDialog::kerning_tab(){ _KerningPairsList.append_column(_("Second Unicode range"), _KerningPairsListColumns.second_glyph); // _KerningPairsList.append_column_numeric_editable(_("Kerning Value"), _KerningPairsListColumns.kerning_value, "%f"); - kerning_vbox.add((Gtk::Widget&) kerning_preview); + kerning_vbox.pack_start((Gtk::Widget&) kerning_preview, false,false); - Gtk::HBox* kerning_amount_hbox = Gtk::manage(new Gtk::HBox()); + // kerning_slider has a big handle. Extra padding added + Gtk::HBox* kerning_amount_hbox = Gtk::manage(new Gtk::HBox(false, 8)); kerning_vbox.pack_start(*kerning_amount_hbox, false,false); - kerning_amount_hbox->add(*Gtk::manage(new Gtk::Label(_("Kerning value:")))); - kerning_amount_hbox->add(*kerning_slider); + kerning_amount_hbox->pack_start(*Gtk::manage(new Gtk::Label(_("Kerning Value:"))), false,false); + kerning_amount_hbox->pack_start(*kerning_slider, true,true); kerning_preview.set_size(300 + 20, 150 + 20); _font_da.set_size(300 + 50 + 20, 60 + 20); @@ -1014,7 +1027,7 @@ SvgFontsDialog::SvgFontsDialog() //List of SVGFonts declared in a document: _model = Gtk::ListStore::create(_columns); _FontsList.set_model(_model); - _FontsList.append_column_editable(_("_Font"), _columns.label); + _FontsList.append_column_editable(_("_Fonts"), _columns.label); _FontsList.get_selection()->signal_changed().connect(sigc::mem_fun(*this, &SvgFontsDialog::on_font_selection_changed)); this->update_fonts(); @@ -1030,14 +1043,14 @@ SvgFontsDialog::SvgFontsDialog() //Text Preview: _preview_entry.signal_changed().connect(sigc::mem_fun(*this, &SvgFontsDialog::on_preview_text_changed)); - _getContents()->add((Gtk::Widget&) _font_da); + _getContents()->pack_start((Gtk::Widget&) _font_da, false, false); _preview_entry.set_text(_("Sample Text")); _font_da.set_text(_("Sample Text")); - Gtk::HBox* preview_entry_hbox = Gtk::manage(new Gtk::HBox()); - _getContents()->add(*preview_entry_hbox); - preview_entry_hbox->add(*Gtk::manage(new Gtk::Label(_("Preview Text:")))); - preview_entry_hbox->add(_preview_entry); + Gtk::HBox* preview_entry_hbox = Gtk::manage(new Gtk::HBox(false, 4)); + _getContents()->pack_start(*preview_entry_hbox, false, false); // Non-latin characters may need more height. + preview_entry_hbox->pack_start(*Gtk::manage(new Gtk::Label(_("Preview Text:"))), false, false); + preview_entry_hbox->pack_start(_preview_entry, true, true); _FontsList.signal_button_release_event().connect_notify(sigc::mem_fun(*this, &SvgFontsDialog::fonts_list_button_release)); create_fonts_popup_menu(_FontsList, sigc::mem_fun(*this, &SvgFontsDialog::remove_selected_font)); diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp index 06a76605b..a055da14a 100644 --- a/src/ui/dialog/symbols.cpp +++ b/src/ui/dialog/symbols.cpp @@ -164,14 +164,6 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) : search->signal_key_press_event().connect_notify( sigc::mem_fun(*this, &SymbolsDialog::beforeSearch)); search->signal_key_release_event().connect_notify(sigc::mem_fun(*this, &SymbolsDialog::unsensitive)); -#if GTKMM_CHECK_VERSION(3,12,0) - search->set_margin_start(10); - search->set_margin_end(10); -#else - search->set_margin_left(10); - search->set_margin_right(10); -#endif - search->set_margin_bottom(6); search->signal_search_changed().connect(sigc::mem_fun(*this, &SymbolsDialog::clearSearch)); table->attach(*Gtk::manage(search),0,row,2,1); diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 4f2f04ec6..fd8422652 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -91,8 +91,9 @@ TextEdit::TextEdit() preview_label.set_justify (Gtk::JUSTIFY_CENTER); preview_label.set_line_wrap (false); + font_vbox.set_border_width(4); font_vbox.pack_start(font_selector, true, true); - font_vbox.pack_start(preview_label, false, false, 5); + font_vbox.pack_start(preview_label, false, false, 4); /* Features tab ---------------------------- */ @@ -101,8 +102,9 @@ TextEdit::TextEdit() preview_label2.set_justify (Gtk::JUSTIFY_CENTER); preview_label2.set_line_wrap (false); + feat_vbox.set_border_width(4); feat_vbox.pack_start(font_features, true, true); - feat_vbox.pack_start(preview_label2, false, false, 5); + feat_vbox.pack_start(preview_label2, false, false, 4); /* Text tab -------------------------------- */ scroller.set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC ); diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp index eb7343454..b4190f5e1 100644 --- a/src/ui/dialog/tracedialog.cpp +++ b/src/ui/dialog/tracedialog.cpp @@ -672,6 +672,7 @@ TraceDialogImpl::TraceDialogImpl() : //modeQuantFrame.set_shadow_type(Gtk::SHADOW_NONE); modeMultiScanFrame.add(modeMultiScanVBox); modePageBox.pack_start(modeMultiScanFrame, false, false, 0); + modePageBox.set_border_width(MARGIN); //# end multiple scan @@ -743,6 +744,7 @@ TraceDialogImpl::TraceDialogImpl() : optionsFrame.set_label(_("Options")); optionsFrame.add(optionsVBox); optionsPageBox.pack_start(optionsFrame, false, false, 0); + optionsPageBox.set_border_width(MARGIN); //## end option page @@ -750,9 +752,12 @@ TraceDialogImpl::TraceDialogImpl() : //### credits - potraceCreditsLabel.set_text(_("Inkscape bitmap tracing\nis based on Potrace,\ncreated by Peter Selinger\n\nhttp://potrace.sourceforge.net")); + potraceCreditsLabel.set_text(_("Inkscape bitmap tracing is based on Potrace, created by Peter Selinger.\n\nhttp://potrace.sourceforge.net")); + potraceCreditsLabel.set_line_wrap(true); + potraceCreditsLabel.set_halign(Gtk::ALIGN_START); potraceCreditsVBox.pack_start(potraceCreditsLabel, false, false, MARGIN); + potraceCreditsVBox.set_border_width(MARGIN); notebook.append_page(potraceCreditsVBox, _("Credits")); //### end notebook @@ -765,13 +770,15 @@ TraceDialogImpl::TraceDialogImpl() : //#### begin right panel + rightVBox.set_border_width(MARGIN); + //## SIOX sioxButton.set_label(_("SIOX _foreground selection")); sioxButton.set_use_underline(true); - sioxBox.pack_start(sioxButton, false, false, MARGIN); + sioxBox.pack_start(sioxButton, false, false); sioxButton.set_tooltip_text(_("Cover the area you want to select as the foreground")); - rightVBox.pack_start(sioxBox, false, false, 0); + rightVBox.pack_start(sioxBox, false, false); //## preview Gtk::HBox *previewButtonHBox = Gtk::manage(new Gtk::HBox(false, MARGIN )); diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index e8cbf4d01..d4649ddd1 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -105,7 +105,7 @@ Transformation::Transformation() contents->set_spacing(0); // Notebook for individual transformations - contents->pack_start(_notebook, true, true); + contents->pack_start(_notebook, false, false); _page_move.set_halign(Gtk::ALIGN_START); _notebook.append_page(_page_move, _("_Move"), true); @@ -130,7 +130,7 @@ Transformation::Transformation() _notebook.signal_switch_page().connect(sigc::mem_fun(*this, &Transformation::onSwitchPage)); // Apply separately - contents->pack_start(_check_apply_separately, true, true); + contents->pack_start(_check_apply_separately, false, false); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); _check_apply_separately.set_active(prefs->getBool("/dialogs/transformation/applyseparately")); _check_apply_separately.signal_toggled().connect(sigc::mem_fun(*this, &Transformation::onApplySeparatelyToggled)); diff --git a/src/ui/widget/font-selector.cpp b/src/ui/widget/font-selector.cpp index 4b9cdb87e..0b096995c 100644 --- a/src/ui/widget/font-selector.cpp +++ b/src/ui/widget/font-selector.cpp @@ -89,6 +89,8 @@ FontSelector::FontSelector (bool with_size, bool with_variations) // Grid set_name ("FontSelectorGrid"); + set_row_spacing(4); + set_column_spacing(4); attach (family_frame, 0, 0, 1, 2); attach (style_frame, 1, 0, 2, 1); if (with_size) { // Glyph panel does not use size. diff --git a/src/ui/widget/font-variants.cpp b/src/ui/widget/font-variants.cpp index a8ff3893f..2fb5b615b 100644 --- a/src/ui/widget/font-variants.cpp +++ b/src/ui/widget/font-variants.cpp @@ -220,6 +220,14 @@ namespace Widget { _ligatures_grid.attach( _ligatures_label_discretionary, 1, 1, 1, 1); _ligatures_grid.attach( _ligatures_label_historical, 1, 2, 1, 1); _ligatures_grid.attach( _ligatures_label_contextual, 1, 3, 1, 1); + +#if GTK_CHECK_VERSION(3,12,0) + _ligatures_grid.set_margin_start(15); + _ligatures_grid.set_margin_end(15); +#else + _ligatures_grid.set_margin_left(15); + _ligatures_grid.set_margin_right(15); +#endif _ligatures_frame.add( _ligatures_grid ); pack_start( _ligatures_frame, Gtk::PACK_SHRINK ); @@ -246,6 +254,14 @@ namespace Widget { _position_grid.attach( _position_normal, 0, 0, 1, 1); _position_grid.attach( _position_sub, 1, 0, 1, 1); _position_grid.attach( _position_super, 2, 0, 1, 1); + +#if GTK_CHECK_VERSION(3,12,0) + _position_grid.set_margin_start(15); + _position_grid.set_margin_end(15); +#else + _position_grid.set_margin_left(15); + _position_grid.set_margin_right(15); +#endif _position_frame.add( _position_grid ); pack_start( _position_frame, Gtk::PACK_SHRINK ); @@ -288,6 +304,14 @@ namespace Widget { _caps_grid.attach( _caps_all_small, 1, 1, 1, 1); _caps_grid.attach( _caps_petite, 2, 1, 1, 1); _caps_grid.attach( _caps_all_petite, 3, 1, 1, 1); + +#if GTK_CHECK_VERSION(3,12,0) + _caps_grid.set_margin_start(15); + _caps_grid.set_margin_end(15); +#else + _caps_grid.set_margin_left(15); + _caps_grid.set_margin_right(15); +#endif _caps_frame.add( _caps_grid ); pack_start( _caps_frame, Gtk::PACK_SHRINK ); @@ -359,6 +383,13 @@ namespace Widget { _numeric_grid.attach (_numeric_slashed_zero, 0, 4, 1, 1); _numeric_grid.attach (_numeric_slashed_zero_label, 1, 4, 1, 1); +#if GTK_CHECK_VERSION(3,12,0) + _numeric_grid.set_margin_start(15); + _numeric_grid.set_margin_end(15); +#else + _numeric_grid.set_margin_left(15); + _numeric_grid.set_margin_right(15); +#endif _numeric_frame.add( _numeric_grid ); pack_start( _numeric_frame, Gtk::PACK_SHRINK ); @@ -394,15 +425,22 @@ namespace Widget { _asian_grid.attach (_asian_default_variant, 0, 0, 1, 1); _asian_grid.attach (_asian_jis78, 1, 0, 1, 1); _asian_grid.attach (_asian_jis83, 2, 0, 1, 1); - _asian_grid.attach (_asian_jis90, 3, 0, 1, 1); - _asian_grid.attach (_asian_jis04, 4, 0, 1, 1); - _asian_grid.attach (_asian_simplified, 5, 0, 1, 1); - _asian_grid.attach (_asian_traditional, 6, 0, 1, 1); - _asian_grid.attach (_asian_default_width, 0, 1, 1, 1); - _asian_grid.attach (_asian_full_width, 1, 1, 1, 1); - _asian_grid.attach (_asian_proportional_width, 2, 1, 1, 1); - _asian_grid.attach (_asian_ruby, 0, 2, 1, 1); - + _asian_grid.attach (_asian_jis90, 1, 1, 1, 1); + _asian_grid.attach (_asian_jis04, 2, 1, 1, 1); + _asian_grid.attach (_asian_simplified, 1, 2, 1, 1); + _asian_grid.attach (_asian_traditional, 2, 2, 1, 1); + _asian_grid.attach (_asian_default_width, 0, 3, 1, 1); + _asian_grid.attach (_asian_full_width, 1, 3, 1, 1); + _asian_grid.attach (_asian_proportional_width, 2, 3, 1, 1); + _asian_grid.attach (_asian_ruby, 0, 4, 1, 1); + +#if GTK_CHECK_VERSION(3,12,0) + _asian_grid.set_margin_start(15); + _asian_grid.set_margin_end(15); +#else + _asian_grid.set_margin_left(15); + _asian_grid.set_margin_right(15); +#endif _asian_frame.add( _asian_grid ); pack_start( _asian_frame, Gtk::PACK_SHRINK ); @@ -438,6 +476,13 @@ namespace Widget { _feature_vbox.pack_start( _feature_substitutions ); _feature_vbox.pack_start( _feature_list ); +#if GTK_CHECK_VERSION(3,12,0) + _feature_vbox.set_margin_start(15); + _feature_vbox.set_margin_end(15); +#else + _feature_vbox.set_margin_left(15); + _feature_vbox.set_margin_right(15); +#endif _feature_frame.add( _feature_vbox ); pack_start( _feature_frame, Gtk::PACK_SHRINK ); |
