From 838a37a4fe0fa8bb39ba7de5cddf646db3728865 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 17 Jan 2007 14:53:27 +0000 Subject: [PATCH] fix for height of editor hscrollbar git-svn-id: svn://localhost/ardour2/trunk@1337 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour2_ui.rc | 12 ++++++++++++ gtk2_ardour/audio_clock.cc | 11 +++++++++++ gtk2_ardour/editor.cc | 4 +++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/ardour2_ui.rc b/gtk2_ardour/ardour2_ui.rc index 766203e40d..46c7057ea3 100644 --- a/gtk2_ardour/ardour2_ui.rc +++ b/gtk2_ardour/ardour2_ui.rc @@ -322,6 +322,17 @@ style "ardour_adjusters" = "default_buttons_menus" bg[ACTIVE] = { 0.06, 0.06, 0.06 } } +style "editor_hscrollbar" = "ardour_adjusters" +{ + # + # special case: we want this scrollbar to be as tall as the + # zoom focus selector combobox. scrollbars don't expand to + # fill the space available to them, so we have to explicitly + # make it bigger. + # + GtkRange::slider_width = 27 +} + style "ardour_progressbars" = "default_buttons_menus" { bg[NORMAL] = { 0, 0, 0 } @@ -1346,6 +1357,7 @@ widget "*PanningLinkDirectionButton.*" style "very_small_button" widget "*ChannelCountSelector" style "medium_bold_entry" widget "*ChannelCountSelector.GtkArrow" style "default_buttons_menus" widget "*RegionListWholeFile" style "treeview_parent_node" +widget "*EditorHScrollbar" style "editor_hscrollbar" class "GtkWidget" style "default_base" class "GtkScrollbar" style "ardour_adjusters" diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 66822289c2..481e91b09a 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -768,6 +768,17 @@ AudioClock::field_key_release_event (GdkEventKey *ev, Field field) // Check SMPTE fields for sanity (may also adjust fields) smpte_sanitize_display(); break; + case Bars: + case Beats: + case Ticks: + // Bars or beats should never be 0 + if (atoi(bars_label.get_text()) == 0) { + bars_label.set_text("001"); + } + if (atoi(beats_label.get_text()) == 0) { + beats_label.set_text("01"); + } + break; default: break; } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 55730cae11..f7bcc4d6dc 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -359,6 +359,8 @@ Editor::Editor (AudioEngine& eng) edit_hscrollbar.signal_button_release_event().connect (mem_fun(*this, &Editor::hscrollbar_button_release)); edit_hscrollbar.signal_size_allocate().connect (mem_fun(*this, &Editor::hscrollbar_allocate)); + edit_hscrollbar.set_name ("EditorHScrollbar"); + build_cursors (); setup_toolbar (); @@ -2541,7 +2543,7 @@ Editor::setup_toolbar () zoom_out_full_button.add (*(manage (new Image (::get_icon("zoom_full"))))); zoom_out_full_button.signal_clicked().connect (mem_fun(*this, &Editor::temporal_zoom_session)); 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, "Edit Cursor", FUDGE, 0); set_popdown_strings (zoom_focus_selector, zoom_focus_strings);