/*
- Copyright (C) 2008 Paul Davis
+ Copyright (C) 2008 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "midi_scroomer.h"
-
+#include <iostream>
#include <cairomm/context.h>
-#include <iostream>
+#include "midi_scroomer.h"
+#include "ui_config.h"
-using namespace Gtkmm2ext;
using namespace Gtk;
using namespace std;
//std::map<int, Glib::RefPtr<Gdk::Pixmap> > MidiScroomer::piano_pixmaps;
MidiScroomer::MidiScroomer(Adjustment& adj)
- : Gtkmm2ext::Scroomer(adj)
+ : ArdourWidgets::Scroomer(adj)
{
adj.set_lower(0);
for (int note = lnote; note < hnote + 1; ++note) {
double y = height - note * note2y;
bool draw = false;
-
+
switch (note % 12) {
case 1:
case 6:
default:
break;
}
-
+
if(draw) {
cc->set_line_width(1.4 * note2y);
cc->move_to(0, y);
void
MidiScroomer::on_size_request(Gtk::Requisition* r)
{
- r->width = 12;
- r->height = 100;
-}
-
-void
-MidiScroomer::on_size_allocate(Gtk::Allocation& a)
-{
- Scroomer::on_size_allocate(a);
+ r->width = std::max (12.f, rintf (12.f * UIConfiguration::instance().get_ui_scale()));
}
-