mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
make libs/widgets use/provide default window positon
We cannot extend this to gtkmm2ext base classes yet, because there a 1-way dependency between libs/widgets and libs/gtkmm2ext. May have to move UIConfigurationBase into gtkmm2ext to allow that
This commit is contained in:
parent
76c33f4680
commit
f70b59f349
3 changed files with 9 additions and 3 deletions
|
|
@ -18,7 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ytkmm/label.h>
|
#include <ytkmm/label.h>
|
||||||
#include <widgets/choice.h>
|
|
||||||
|
#include "widgets/choice.h"
|
||||||
|
#include "widgets/ui_config.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace sigc;
|
using namespace sigc;
|
||||||
|
|
@ -34,7 +36,7 @@ Choice::Choice (string title, string prompt, vector<string> choices, bool center
|
||||||
if (center) {
|
if (center) {
|
||||||
set_position (Gtk::WIN_POS_CENTER);
|
set_position (Gtk::WIN_POS_CENTER);
|
||||||
} else {
|
} else {
|
||||||
set_position (Gtk::WIN_POS_MOUSE);
|
set_position (UIConfigurationBase::instance().get_default_window_position());
|
||||||
}
|
}
|
||||||
|
|
||||||
set_name ("ChoiceWindow");
|
set_name ("ChoiceWindow");
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ TearOff::tear_it_off ()
|
||||||
own_window.set_name (get_name());
|
own_window.set_name (get_name());
|
||||||
close_event_box.set_name (get_name());
|
close_event_box.set_name (get_name());
|
||||||
if (own_window_width == 0) {
|
if (own_window_width == 0) {
|
||||||
own_window.set_position (WIN_POS_MOUSE);
|
own_window.set_position (UIConfigurationBase::instance().get_default_window_position());
|
||||||
}
|
}
|
||||||
own_window.show_all ();
|
own_window.show_all ();
|
||||||
own_window.present ();
|
own_window.present ();
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
|
|
||||||
#include <pangomm/fontdescription.h>
|
#include <pangomm/fontdescription.h>
|
||||||
|
|
||||||
|
#include "ytkmm/enums.h"
|
||||||
|
|
||||||
#include "pbd/configuration.h"
|
#include "pbd/configuration.h"
|
||||||
#include "gtkmm2ext/colors.h"
|
#include "gtkmm2ext/colors.h"
|
||||||
|
|
||||||
|
|
@ -52,6 +54,8 @@ public:
|
||||||
virtual Pango::FontDescription get_NormalMonospaceFont () const = 0;
|
virtual Pango::FontDescription get_NormalMonospaceFont () const = 0;
|
||||||
virtual Pango::FontDescription get_SmallMonospaceFont () const = 0;
|
virtual Pango::FontDescription get_SmallMonospaceFont () const = 0;
|
||||||
virtual Pango::FontDescription get_ArdourSmallFont () const = 0;
|
virtual Pango::FontDescription get_ArdourSmallFont () const = 0;
|
||||||
|
|
||||||
|
virtual Gtk::WindowPosition get_default_window_position() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue