mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-14 17:36:31 +01:00
[Summary] Changed size of tooltips on Compact Meter Strips on Igor Maximenko's request.
[Feature reviewed] MKosharnyy [Reviewed] VKamyshniy
This commit is contained in:
parent
7fa517dd8e
commit
76236cd796
4 changed files with 23 additions and 7 deletions
|
|
@ -176,7 +176,6 @@ CompactMeterbridge::add_strips (RouteList& routes)
|
|||
}
|
||||
|
||||
CompactMeterStrip* strip = new CompactMeterStrip (_session, route);
|
||||
strip->set_tooltip_text (route->name ()); //just for dbg purposes
|
||||
_strips [route] = strip;
|
||||
strip->show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ CompactMeterStrip::CompactMeterStrip (Session* sess, boost::shared_ptr<ARDOUR::R
|
|||
, _serial_number (0)
|
||||
, _meter_width (xml_property (*xml_tree ()->root (), "meterwidth", 1))
|
||||
, _thin_meter_width (xml_property (*xml_tree ()->root (), "thinmeterwidth", 1))
|
||||
, _tooltip (this)
|
||||
{
|
||||
set_attributes (*this, *xml_tree ()->root (), XMLNodeMap ());
|
||||
|
||||
|
|
@ -86,6 +87,17 @@ CompactMeterStrip::CompactMeterStrip (Session* sess, boost::shared_ptr<ARDOUR::R
|
|||
}
|
||||
|
||||
signal_button_press_event().connect(sigc::mem_fun(*this, &CompactMeterStrip::on_eventbox_button_press) );
|
||||
|
||||
|
||||
std::string str_font_description;
|
||||
#if defined (PLATFORM_WINDOWS)
|
||||
str_font_description = xml_property (*xml_tree ()->root (), "tooltip_winfont", "Arial Bold 20");
|
||||
#elif defined (__APPLE__)
|
||||
str_font_description = xml_property (*xml_tree ()->root (), "tooltip_macfont", "Helvetica Bold 20");
|
||||
#endif
|
||||
|
||||
_tooltip.set_font (Pango::FontDescription(str_font_description));
|
||||
_tooltip.set_center_alignment (false);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -130,9 +142,7 @@ void
|
|||
CompactMeterStrip::update_tooltip ()
|
||||
{
|
||||
string record_status = _route->record_enabled() ? "Record Enabled" : "Record Disabled";
|
||||
|
||||
stringstream ss;
|
||||
this->set_tooltip_text (string_compose ("Track %1\n%2\n%3", _serial_number, _route->name (), record_status));
|
||||
_tooltip.set_tip (string_compose ("%1\n%2\n%3", _serial_number, _route->name (), record_status));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#define __tracks_compact_meter_strip__
|
||||
|
||||
#include "waves_ui.h"
|
||||
#include "gtkmm2ext/persistent_tooltip.h"
|
||||
#include "level_meter.h"
|
||||
#include "ardour/ardour.h"
|
||||
|
||||
|
|
@ -37,6 +38,7 @@ class CompactMeterStrip : public Gtk::EventBox, public WavesUI
|
|||
size_t get_serial_number () { return _serial_number; }
|
||||
void set_serial_number ( size_t serial_number ) { _serial_number = serial_number; }
|
||||
void update_tooltip ();
|
||||
void set_persistant_tooltip_font (Pango::FontDescription font);
|
||||
|
||||
void fast_update ();
|
||||
boost::shared_ptr<ARDOUR::Route> route() { return _route; }
|
||||
|
|
@ -54,7 +56,8 @@ class CompactMeterStrip : public Gtk::EventBox, public WavesUI
|
|||
PBD::ScopedConnectionList _route_connections;
|
||||
int _meter_width;
|
||||
int _thin_meter_width;
|
||||
size_t _serial_number;
|
||||
size_t _serial_number;
|
||||
Gtkmm2ext::PersistentTooltip _tooltip;
|
||||
void meter_configuration_changed (ARDOUR::ChanCount);
|
||||
void update_rec_display ();
|
||||
void route_property_changed(const PBD::PropertyChange& what_changed);
|
||||
|
|
|
|||
|
|
@ -2,12 +2,16 @@
|
|||
|
||||
<CompactMeterStrip bgnormal="#353535"
|
||||
meterwidth="10"
|
||||
thinmeterwidth="4">
|
||||
<VBox spacing="6">
|
||||
thinmeterwidth="4"
|
||||
tooltip_winfont="Arial Bold 20"
|
||||
tooltip_macfont="Helvetica Bold 20">
|
||||
<VBox>
|
||||
<EventBox bgnormal="#303030">
|
||||
<Hbox id="level_meter_home"
|
||||
height="51"/>
|
||||
</EventBox>
|
||||
<EventBox height="6"
|
||||
bgnormal="#353535"/>
|
||||
<EventBox id="record_indicator"
|
||||
bgnormal="#000000"
|
||||
bgactive="#FF0000"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue