View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002566 | ardour | translation | public | 2009-02-23 03:36 | 2020-04-19 20:13 |
Reporter | mtaht | Assigned To | paul | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | SVN/2.0-ongoing | ||||
Summary | 0002566: Fit and finish issues | ||||
Description | There are multiple "fit and finish" issues with ardour when translated into other languages, meaning that the end result looks less polished than it could be. In particular several drop down menus are cut off (some of these are problems in English, too), the speed bar changes in width, and two tooltips are desperately needed. This bug will contain some patches resolving these issues, shortly. | ||||
Tags | No tags attached. | ||||
2009-02-23 05:37
|
vectorized_setsize_function.patch (1,938 bytes)
Index: 2.0-ongoing/libs/gtkmm2ext/gtkmm2ext/utils.h =================================================================== --- 2.0-ongoing/libs/gtkmm2ext/gtkmm2ext/utils.h (revisión: 4634) +++ 2.0-ongoing/libs/gtkmm2ext/gtkmm2ext/utils.h (copia de trabajo) @@ -36,15 +36,22 @@ namespace Gtkmm2ext { void init (); - void get_ink_pixel_size (Glib::RefPtr<Pango::Layout>, int& width, int& height); + void get_ink_pixel_size (Glib::RefPtr<Pango::Layout>, + int& width, int& height); void set_size_request_to_display_given_text (Gtk::Widget &w, const gchar *text, gint hpadding, gint vpadding); - void set_popdown_strings (Gtk::ComboBoxText&, const std::vector<std::string>&); - + void set_size_request_to_display_given_text (Gtk::Widget &w, + const std::vector<std::string>&, + gint hpadding, + gint vpadding); + + void set_popdown_strings (Gtk::ComboBoxText&, + const std::vector<std::string>&); + template<class T> void deferred_delete (void *ptr) { delete static_cast<T *> (ptr); } Index: 2.0-ongoing/libs/gtkmm2ext/utils.cc =================================================================== --- 2.0-ongoing/libs/gtkmm2ext/utils.cc (revisión: 4634) +++ 2.0-ongoing/libs/gtkmm2ext/utils.cc (copia de trabajo) @@ -59,6 +59,26 @@ } void +Gtkmm2ext::set_size_request_to_display_given_text (Gtk::Widget &w, + const std::vector<std::string>& strings, + gint hpadding, gint vpadding) + +{ + int width, height; + int width_max = 0; + int height_max = 0; + w.ensure_style (); + + for (vector<string>::const_iterator i = strings.begin(); + i != strings.end(); ++i) { + get_ink_pixel_size (w.create_pango_layout (*i), width, height); + width_max = max(width_max,width); + height_max = max(height_max, height); + } + w.set_size_request(width_max + hpadding, height_max + vpadding); +} + +void Gtkmm2ext::init () { // Necessary for gettext |
2009-02-23 06:31
|
fix4dropdowns.patch (5,287 bytes)
Index: 2.0-ongoing/gtk2_ardour/ardour_ui2.cc =================================================================== --- 2.0-ongoing/gtk2_ardour/ardour_ui2.cc (revisión: 4634) +++ 2.0-ongoing/gtk2_ardour/ardour_ui2.cc (copia de trabajo) @@ -188,6 +188,11 @@ void ARDOUR_UI::setup_transport () { +#ifdef GTKOSX + const guint32 FUDGE = 38; // Combo's are stupid - they steal space from the entry for the button +#else + const guint32 FUDGE = 24; // Combo's are stupid - they steal space from the entry for the button +#endif transport_tearoff = manage (new TearOff (transport_tearoff_hbox)); transport_tearoff->set_name ("TransportBase"); @@ -374,11 +379,12 @@ shuttle_units_button.set_name (X_("ShuttleButton")); shuttle_units_button.signal_clicked().connect (mem_fun(*this, &ARDOUR_UI::shuttle_unit_clicked)); - shuttle_style_button.set_name (X_("ShuttleButton")); + shuttle_style_button.set_name (X_("ShuttleStyleButton")); vector<string> shuttle_strings; shuttle_strings.push_back (_("sprung")); shuttle_strings.push_back (_("wheel")); + set_size_request_to_display_given_text (shuttle_style_button, shuttle_strings, 6+FUDGE, 10); set_popdown_strings (shuttle_style_button, shuttle_strings); shuttle_style_button.signal_changed().connect (mem_fun (*this, &ARDOUR_UI::shuttle_style_changed)); @@ -389,8 +395,7 @@ mtc_port_changed (); sync_option_combo.signal_changed().connect (mem_fun (*this, &ARDOUR_UI::sync_option_changed)); - const guint32 FUDGE = 25; // Combo's are stupid - they steal space from the entry for the button - set_size_request_to_display_given_text (sync_option_combo, X_("Igternal"), 2+FUDGE, 10); + set_size_request_to_display_given_text (sync_option_combo, X_("Igternal"), 4+FUDGE, 10); shbox->pack_start (*sdframe, false, false); shbox->pack_start (shuttle_units_button, true, true); @@ -878,8 +883,6 @@ Config->map_parameters (mem_fun (*this, &ARDOUR_UI::parameter_changed)); set_size_request_to_display_given_text (speed_display_box, _("-0.55"), 2, 2); - const guint32 FUDGE = 25; // Combo's are stupid - they steal space from the entry for the button - set_size_request_to_display_given_text (shuttle_style_button, _("sprung"), 2+FUDGE, 10); reset_dpi(); } Index: 2.0-ongoing/gtk2_ardour/editor.cc =================================================================== --- 2.0-ongoing/gtk2_ardour/editor.cc (revisión: 4634) +++ 2.0-ongoing/gtk2_ardour/editor.cc (copia de trabajo) @@ -2911,7 +2911,7 @@ edit_mode_strings.push_back (edit_mode_to_string (Lock)); edit_mode_selector.set_name ("EditModeSelector"); - Gtkmm2ext::set_size_request_to_display_given_text (edit_mode_selector, longest (edit_mode_strings).c_str(), 2+FUDGE, 10); + Gtkmm2ext::set_size_request_to_display_given_text (edit_mode_selector, edit_mode_strings, 7+FUDGE, 10); set_popdown_strings (edit_mode_selector, edit_mode_strings); edit_mode_selector.signal_changed().connect (mem_fun(*this, &Editor::edit_mode_selection_done)); @@ -2991,7 +2991,7 @@ ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_full_button, _("Zoom to Session")); zoom_focus_selector.set_name ("ZoomFocusSelector"); - Gtkmm2ext::set_size_request_to_display_given_text (zoom_focus_selector, _("Playhead"), FUDGE, 0); + Gtkmm2ext::set_size_request_to_display_given_text (zoom_focus_selector, zoom_focus_strings, 2+FUDGE, 10); set_popdown_strings (zoom_focus_selector, zoom_focus_strings); zoom_focus_selector.signal_changed().connect (mem_fun(*this, &Editor::zoom_focus_selection_done)); ARDOUR_UI::instance()->tooltips().set_tip (zoom_focus_selector, _("Zoom focus")); @@ -3005,19 +3005,19 @@ snap_box.set_border_width (2); snap_type_selector.set_name ("SnapTypeSelector"); - Gtkmm2ext::set_size_request_to_display_given_text (snap_type_selector, _("SMPTE Seconds"), 2+FUDGE, 10); + Gtkmm2ext::set_size_request_to_display_given_text (snap_type_selector, snap_type_strings, 7+FUDGE, 10); set_popdown_strings (snap_type_selector, snap_type_strings); snap_type_selector.signal_changed().connect (mem_fun(*this, &Editor::snap_type_selection_done)); ARDOUR_UI::instance()->tooltips().set_tip (snap_type_selector, _("Snap/Grid Units")); snap_mode_selector.set_name ("SnapModeSelector"); - Gtkmm2ext::set_size_request_to_display_given_text (snap_mode_selector, _("Magnetic Snap"), 2+FUDGE, 10); + Gtkmm2ext::set_size_request_to_display_given_text (snap_mode_selector, snap_mode_strings, 7+FUDGE, 10); set_popdown_strings (snap_mode_selector, snap_mode_strings); snap_mode_selector.signal_changed().connect (mem_fun(*this, &Editor::snap_mode_selection_done)); ARDOUR_UI::instance()->tooltips().set_tip (snap_mode_selector, _("Snap/Grid Mode")); - edit_point_selector.set_name ("SnapModeSelector"); - Gtkmm2ext::set_size_request_to_display_given_text (edit_point_selector, _("Playhead"), 2+FUDGE, 10); + edit_point_selector.set_name ("EditPointSelector"); + Gtkmm2ext::set_size_request_to_display_given_text (edit_point_selector, edit_point_strings, 7+FUDGE, 10); set_popdown_strings (edit_point_selector, edit_point_strings); edit_point_selector.signal_changed().connect (mem_fun(*this, &Editor::edit_point_selection_done)); ARDOUR_UI::instance()->tooltips().set_tip (edit_point_selector, _("Edit point")); |
|
The first patch (vectorized_setsize_function.patch) creates a new function in libgtkmmext that has the same syntax as an existing function but takes a vector of internationalized strings as an argument. Sorry, this triggers a recompile. The second patch fixes the 4 most glaring problems with the drop down menus on the primary editor screen. There are several other places where an arbitrary string is used within ardour to determine the width of the drop down or button, but these stood out. See http://www.teklibre.com/~d/ardour/ardour2_latest_es.png These patches also improve the appearance of the english version as well. I have versions of these patches for 3.0, along with adding two new tooltips, and a (currently failing) attempt at making the speedbar stop forcing a resize. |
|
Looks better in german, too: http://www.teklibre.com/~d/ardour/notpatched.png http://www.teklibre.com/~d/ardour/patched.png |
|
both patches applied to 2.0-ongoing. rev. 4741. and applied to 3.0 rev. 4742. |
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-02-23 03:36 | mtaht | New Issue | |
2009-02-23 03:36 | mtaht | cost | => 0.00 |
2009-02-23 03:37 | mtaht | Relationship added | child of 0002565 |
2009-02-23 05:37 | mtaht | File Added: vectorized_setsize_function.patch | |
2009-02-23 06:31 | mtaht | File Added: fix4dropdowns.patch | |
2009-02-23 06:37 | mtaht | Note Added: 0005753 | |
2009-02-24 08:27 | mtaht | Note Added: 0005768 | |
2009-02-26 01:29 | mtaht | Relationship added | related to 0002571 |
2009-03-06 17:06 | paul | Status | new => resolved |
2009-03-06 17:06 | paul | Resolution | open => fixed |
2009-03-06 17:06 | paul | Assigned To | => paul |
2009-03-06 17:06 | paul | Note Added: 0005794 | |
2020-04-19 20:13 | system | Note Added: 0021871 | |
2020-04-19 20:13 | system | Status | resolved => closed |