mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
move UIConfigurationBase from libs/widgets to libs/gtkmm2ext
This commit is contained in:
parent
e0d25220a6
commit
9d25f83e21
14 changed files with 27 additions and 21 deletions
|
|
@ -28,11 +28,11 @@
|
|||
#include "pbd/configuration.h"
|
||||
#include "gtkmm2ext/colors.h"
|
||||
|
||||
#include "widgets/visibility.h"
|
||||
#include "gtkmm2ext/visibility.h"
|
||||
|
||||
namespace ArdourWidgets {
|
||||
namespace Gtkmm2ext {
|
||||
|
||||
class LIBWIDGETS_API UIConfigurationBase : public PBD::Configuration
|
||||
class LIBGTKMM2EXT_API UIConfigurationBase : public PBD::Configuration
|
||||
{
|
||||
protected:
|
||||
virtual ~UIConfigurationBase() { _instance = 0; }
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
namespace ArdourWidgets {
|
||||
namespace Gtkmm2ext {
|
||||
|
||||
UIConfigurationBase* UIConfigurationBase::_instance = 0;
|
||||
|
||||
|
|
@ -42,6 +42,7 @@ gtkmm2ext_sources = [
|
|||
'string_completion.cc',
|
||||
'textviewer.cc',
|
||||
'treeutils.cc',
|
||||
'ui_config.cc',
|
||||
'utils.cc',
|
||||
'visibility_tracker.cc',
|
||||
'window_proxy.cc',
|
||||
|
|
|
|||
|
|
@ -36,13 +36,14 @@
|
|||
|
||||
#include "widgets/ardour_button.h"
|
||||
#include "widgets/tooltips.h"
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
using namespace PBD;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace ArdourWidgets;
|
||||
using std::max;
|
||||
using std::min;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "widgets/ardour_ctrl_base.h"
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "widgets/ardour_fader.h"
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
using namespace Gtk;
|
||||
using namespace std;
|
||||
|
|
|
|||
|
|
@ -27,11 +27,12 @@
|
|||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "widgets/ardour_knob.h"
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
using namespace ArdourWidgets;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace PBD;
|
||||
|
||||
ArdourKnob::Element ArdourKnob::default_elements = ArdourKnob::Element (ArdourKnob::Arc);
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@
|
|||
#include <ytkmm/label.h>
|
||||
|
||||
#include "widgets/choice.h"
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace ArdourWidgets;
|
||||
|
||||
Choice::Choice (string title, string prompt, vector<string> choices, bool center)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "gtkmm2ext/utils.h"
|
||||
#include "widgets/fastmeter.h"
|
||||
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
|
||||
#define UINT_TO_RGB(u,r,g,b) { (*(r)) = ((u)>>16)&0xff; (*(g)) = ((u)>>8)&0xff; (*(b)) = (u)&0xff; }
|
||||
|
|
|
|||
|
|
@ -22,10 +22,11 @@
|
|||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "widgets/frame.h"
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace ArdourWidgets;
|
||||
|
||||
Frame::Frame (Orientation orientation, bool boxy)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include "pbd/unwind.h"
|
||||
|
||||
#include "widgets/metabutton.h"
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
using namespace Gtk;
|
||||
using namespace std;
|
||||
|
|
@ -245,6 +245,7 @@ MetaButton::set_index (guint index)
|
|||
void
|
||||
MetaButton::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t* rect)
|
||||
{
|
||||
using namespace Gtkmm2ext;
|
||||
{
|
||||
PBD::Unwinder uw (_hovering, false);
|
||||
ArdourButton::render (ctx, rect);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "widgets/tearoff.h"
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
|
|
@ -33,6 +33,7 @@ using namespace std;
|
|||
using namespace Glib;
|
||||
using namespace Gdk;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace ArdourWidgets;
|
||||
|
||||
TearOff::TearOff (Widget& c, bool allow_resize)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "gtkmm2ext/cairo_widget.h"
|
||||
#include "gtkmm2ext/colors.h"
|
||||
#include "widgets/ui_config.h"
|
||||
#include "gtkmm2ext/ui_config.h"
|
||||
|
||||
#include "widgets/visibility.h"
|
||||
|
||||
|
|
@ -39,10 +39,10 @@ protected:
|
|||
|
||||
void on_size_request (Gtk::Requisition* req) {
|
||||
if (_natural_width > 0) {
|
||||
req->width = _natural_width * UIConfigurationBase::instance().get_ui_scale ();
|
||||
req->width = _natural_width * Gtkmm2ext::UIConfigurationBase::instance().get_ui_scale ();
|
||||
}
|
||||
if (_natural_height > 0) {
|
||||
req->height = _natural_height * UIConfigurationBase::instance().get_ui_scale ();
|
||||
req->height = _natural_height * Gtkmm2ext::UIConfigurationBase::instance().get_ui_scale ();
|
||||
}
|
||||
CairoWidget::on_size_request (req);
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ protected:
|
|||
float h = height * _ratio;
|
||||
float t = .5f * (height - h);
|
||||
ctx->rectangle (0, t, 1, h);
|
||||
uint32_t c = UIConfigurationBase::instance().color ("neutral:backgroundest");
|
||||
uint32_t c = Gtkmm2ext::UIConfigurationBase::instance().color ("neutral:backgroundest");
|
||||
Gtkmm2ext::set_source_rgba (ctx, c);
|
||||
ctx->fill ();
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ protected:
|
|||
float w = width * _ratio;
|
||||
float t = .5f * (width - w);
|
||||
ctx->rectangle (t, 0, w, 1);
|
||||
uint32_t c = UIConfigurationBase::instance().color ("neutral:backgroundest");
|
||||
uint32_t c = Gtkmm2ext::UIConfigurationBase::instance().color ("neutral:backgroundest");
|
||||
Gtkmm2ext::set_source_rgba (ctx, c);
|
||||
ctx->fill ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,8 +44,7 @@ widgets_sources = [
|
|||
'stateful_button.cc',
|
||||
'tabbable.cc',
|
||||
'tearoff.cc',
|
||||
'tooltips.cc',
|
||||
'ui_config.cc',
|
||||
'tooltips.cc'
|
||||
]
|
||||
|
||||
def options(opt):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue