13
0

Scale scommer and piano-keyboard width with GUI

This commit is contained in:
Robin Gareus 2017-05-04 17:22:43 +02:00
parent 8a6d303778
commit 4aeb086fe3
2 changed files with 6 additions and 5 deletions

View File

@ -16,11 +16,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include "midi_scroomer.h" #include <iostream>
#include <cairomm/context.h> #include <cairomm/context.h>
#include <iostream> #include "midi_scroomer.h"
#include "ui_config.h"
using namespace Gtkmm2ext; using namespace Gtkmm2ext;
using namespace Gtk; using namespace Gtk;
@ -164,5 +164,5 @@ MidiScroomer::get_colors(double color[], Component comp)
void void
MidiScroomer::on_size_request(Gtk::Requisition* r) MidiScroomer::on_size_request(Gtk::Requisition* r)
{ {
r->width = 12; r->width = std::max (12.f, rintf (12.f * UIConfiguration::instance().get_ui_scale()));
} }

View File

@ -27,6 +27,7 @@
#include "midi_time_axis.h" #include "midi_time_axis.h"
#include "midi_streamview.h" #include "midi_streamview.h"
#include "public_editor.h" #include "public_editor.h"
#include "ui_config.h"
using namespace std; using namespace std;
using namespace Gtkmm2ext; using namespace Gtkmm2ext;
@ -661,7 +662,7 @@ PianoRollHeader::invalidate_note_range(int lowest, int highest)
void void
PianoRollHeader::on_size_request(Gtk::Requisition* r) PianoRollHeader::on_size_request(Gtk::Requisition* r)
{ {
r->width = 20; r->width = std::max (20.f, rintf (20.f * UIConfiguration::instance().get_ui_scale()));
} }
void void