mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
faderport: stick a nice little image of the faderport in the surface GUI
Ideally, the PNG file would be part of the surface GUI but for now just put the PNG into gtk2_ardour/icons
This commit is contained in:
parent
d6943a3406
commit
620f1caf23
3 changed files with 17 additions and 1 deletions
BIN
gtk2_ardour/icons/faderport-small.png
Normal file
BIN
gtk2_ardour/icons/faderport-small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "pbd/unwind.h"
|
||||
#include "pbd/strsplit.h"
|
||||
#include "pbd/file_utils.h"
|
||||
|
||||
#include "gtkmm2ext/actions.h"
|
||||
#include "gtkmm2ext/gtk_ui.h"
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
|
||||
#include "faderport.h"
|
||||
#include "gui.h"
|
||||
|
|
@ -88,6 +90,16 @@ FPGUI::FPGUI (FaderPort& p)
|
|||
table.set_border_width (12);
|
||||
table.set_homogeneous (false);
|
||||
|
||||
std::string data_file_path;
|
||||
string name = "faderport-small.png";
|
||||
Searchpath spath(ARDOUR::ardour_data_search_path());
|
||||
spath.add_subdirectory_to_paths ("icons");
|
||||
find_file (spath, name, data_file_path);
|
||||
if (!data_file_path.empty()) {
|
||||
image.set (data_file_path);
|
||||
hpacker.pack_start (image, false, false);
|
||||
}
|
||||
|
||||
Gtk::Label* l;
|
||||
Gtk::Alignment* align;
|
||||
int row = 0;
|
||||
|
|
@ -216,7 +228,8 @@ FPGUI::FPGUI (FaderPort& p)
|
|||
table.attach (action_table, 0, 5, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
|
||||
row++;
|
||||
|
||||
pack_start (table, false, false);
|
||||
hpacker.pack_start (table, true, true);
|
||||
pack_start (hpacker, false, false);
|
||||
|
||||
/* update the port connection combos */
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/combobox.h>
|
||||
#include <gtkmm/image.h>
|
||||
#include <gtkmm/table.h>
|
||||
#include <gtkmm/treestore.h>
|
||||
|
||||
|
|
@ -45,10 +46,12 @@ public:
|
|||
|
||||
private:
|
||||
FaderPort& fp;
|
||||
Gtk::HBox hpacker;
|
||||
Gtk::Table table;
|
||||
Gtk::Table action_table;
|
||||
Gtk::ComboBox input_combo;
|
||||
Gtk::ComboBox output_combo;
|
||||
Gtk::Image image;
|
||||
|
||||
/* the mix, proj, trns and user buttons have no obvious semantics for
|
||||
* ardour, mixbus etc., so we allow the user to define their
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue