From 42795f8b86373786e139b1099cfaee628173e066 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 11 Apr 2013 08:20:16 +0100 Subject: [PATCH] More UI work --- resources/bitmaps/button_gui.png | Bin 3934 -> 3517 bytes resources/bitmaps/button_gui_down.png | Bin 4025 -> 3833 bytes resources/bitmaps/button_gui_hover.png | Bin 3934 -> 3643 bytes resources/resources.qrc | 3 + resources/ui/carla.ui | 13 +++- resources/ui/carla_about.ui | 38 +++++++++-- resources/ui/carla_edit.ui | 10 ++- resources/ui/carla_refresh.ui | 64 +++++++++++------- source/backend/CarlaStandalone.hpp | 2 + source/backend/engine/CarlaEngine.cpp | 5 -- source/backend/engine/CarlaEngineInternal.hpp | 5 -- .../native/distrho/DistrhoPluginCarla.cpp | 3 +- source/backend/plugin/CarlaPluginGui.cpp | 11 ++- source/backend/standalone/CarlaStandalone.cpp | 28 ++++++++ source/backend/standalone/Makefile | 3 +- source/carla.py | 1 + source/carla_backend.py | 8 +++ source/carla_shared.py | 6 ++ source/includes/CarlaDefines.hpp | 7 -- source/libs/Makefile | 3 + 20 files changed, 151 insertions(+), 59 deletions(-) diff --git a/resources/bitmaps/button_gui.png b/resources/bitmaps/button_gui.png index 5d26897deb147fa9a88b94a965ef09131b1da5c8..20d3e4d6b70d3d54e9f1f2d1c58bb49934c2c42a 100644 GIT binary patch delta 862 zcmV-k1EKuh9=#hOiBL{Q4GJ0x0000DNk~Le0000M0000M2nGNE0K~LxJClwI7qKH; z3V$GDNK#Dz0D2_=0Dyx40Qvs_0D$QL0Cg|`0P0`>06Lfe02gnPU&TfM00QVqL_t(| z+SHXxNK{cA#=kqxM2_}6=QcBnT0U};ON+wLG}3Aj#()giN>UQ+B`qSzMT#p|Ey9AZ z2~4St zT9Mw}-Cfw<-+ww5i|xtD$@vlt27OCQOUHFxfA^D25+osnDDZeZ%WZ9K%_R4d%p$3h z+(B}C!rDf1C&^tTb4hA`zyFq$(ti{}*y6lI@QvEq+5kzf1xqKng`}&er{_>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WC4g}Wo6l( zo}Q7dtu5)sjT=9iOs1luD9QQxc_$%6+9nbHg5X3;OUv_@FJB&vu8h4RrOazQK-Y= z&^WLNU{^MqHA|9Y=hL?FxZ=|CVb z+0oJQ1Aql+M7ef2!)wB{nuD5(%ZZx3_CzVxm2l%MAi}Fcb=%SXx^8w70i+ig&^QfKqC# zuC894o}Ru)2$4$lf2pCNVfEa(b8j%lJdClHOeW(!bLPyOgpg4}h;m2n3vRc2Zh3k6 zFk`HhG1juOvf}UR>iWE@s%mpPSG<#eQu@XE`ue+Ns8 zkv^PABx~{MqcMFpwsknFV-ZcPfiJUg0 z(U`8Stxa-ynAvR3Ra8_&0r&_Z!d)(sWx2n-y}h=tukT7lMa4RRoFqv?d3kv{91g#j z&*yi`e}BXi0KPkP=+K2@$Btd)W+=+CELyGB#Ny)O%kg-8P?qI^Qi8XS9zFV_&*z&1 zun8a!fT^mgS5{WeQA(c?MX|$Xvpwzi`!Ak4b?PgN#ggPsVn(CU(A3man4Fxfi9{lg z0yrs@NYqhZUw>k3Z0w}PVu|tPV%s|qi^VKAe{bHj%CekmYinEM_RMlQr9z=lHZn5O z+~42-Rx+7uVFSx-;T=z#+V76GKWYytWBaw(R5{Wbe`0QTyzf)D!q}^`M*lf0p+wGnUhr?ZrF)w56DaKga z#>R&K`0?YXYierZ4u>OMRaKRAI2<~^z&oF7O6ivXM){!G+S*!bW@g6a@pv}*Ttrb6 z_e@Vu?@y&tuLJm+ca)`+ChzM<<9;rvLaMr8wOV8Oe4Yt{APRzDh(@FJsZ^?wQX2cW qU#0-yNdUF{?tnYz>Q3PQN&F5|O#p1h2D7>V0000bitmaps/canvas/frame_node_header.png bitmaps/canvas/frame_port_bg.png + bitmaps/style/arrow.png + bitmaps/style/groupbox.png + scalable/pb_generic.svg scalable/pb_hardware.svg scalable/pb_audacious.svg diff --git a/resources/ui/carla.ui b/resources/ui/carla.ui index 137a9b13c..3a7d8c542 100644 --- a/resources/ui/carla.ui +++ b/resources/ui/carla.ui @@ -125,9 +125,18 @@ 0 - + + 0 + + 0 + + 0 + + + 1 + @@ -169,7 +178,7 @@ 0 0 782 - 19 + 18 diff --git a/resources/ui/carla_about.ui b/resources/ui/carla_about.ui index d3a612e9e..59645d55f 100644 --- a/resources/ui/carla_about.ui +++ b/resources/ui/carla_about.ui @@ -6,7 +6,7 @@ 0 0 - 484 + 510 433 @@ -49,6 +49,12 @@ Qt::Horizontal + + + 0 + 0 + + @@ -56,6 +62,12 @@ Qt::Horizontal + + + 0 + 0 + + @@ -64,7 +76,7 @@ - :/bitmaps/carla_about.png + :/bitmaps/carla_about.png Qt::AlignCenter @@ -183,6 +195,12 @@ + + 0 + + + 1 + Qt::Horizontal @@ -190,6 +208,12 @@ + + 0 + + + 1 + Qt::Horizontal @@ -197,6 +221,12 @@ + + 0 + + + 1 + Qt::Horizontal @@ -326,8 +356,8 @@ - - + + diff --git a/resources/ui/carla_edit.ui b/resources/ui/carla_edit.ui index a4d80a9cd..3ecd75850 100644 --- a/resources/ui/carla_edit.ui +++ b/resources/ui/carla_edit.ui @@ -6,8 +6,8 @@ 0 0 - 686 - 523 + 749 + 585 @@ -535,6 +535,12 @@ Plugin Name + + 0 + + + 1 + Qt::Vertical diff --git a/resources/ui/carla_refresh.ui b/resources/ui/carla_refresh.ui index 1a311d835..1e4e45a5e 100644 --- a/resources/ui/carla_refresh.ui +++ b/resources/ui/carla_refresh.ui @@ -6,8 +6,8 @@ 0 0 - 615 - 255 + 610 + 308 @@ -76,6 +76,12 @@ + + 0 + + + 1 + Qt::Horizontal @@ -102,6 +108,19 @@ + + + + Qt::Horizontal + + + + 40 + 5 + + + + @@ -118,20 +137,13 @@ - - - Qt::Horizontal + + + 0 - - - 40 - 5 - + + 1 - - - - Qt::Vertical @@ -146,13 +158,6 @@ - - - - Qt::Horizontal - - - @@ -388,10 +393,13 @@ - + Qt::Vertical + + QSizePolicy::Fixed + 20 @@ -401,11 +409,17 @@ - + - Qt::Horizontal + Qt::Vertical - + + + 20 + 6 + + + diff --git a/source/backend/CarlaStandalone.hpp b/source/backend/CarlaStandalone.hpp index ec3a13c3a..824078f74 100644 --- a/source/backend/CarlaStandalone.hpp +++ b/source/backend/CarlaStandalone.hpp @@ -183,6 +183,8 @@ struct CarlaTransportInfo { CARLA_EXPORT const char* carla_get_extended_license_text(); CARLA_EXPORT const char* carla_get_supported_file_types(); +CARLA_EXPORT void carla_set_up_qt(uintptr_t app); + CARLA_EXPORT unsigned int carla_get_engine_driver_count(); CARLA_EXPORT const char* carla_get_engine_driver_name(unsigned int index); diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index db4c158ce..9e9fe2b42 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -30,11 +30,6 @@ CARLA_BACKEND_START_NAMESPACE // ------------------------------------------------------------------------------------------------------------------- // Engine Helpers -QMainWindow* getEngineHostWindow(CarlaEngine* const engine) -{ - return CarlaEngineProtectedData::getHostWindow(engine); -} - #ifndef BUILD_BRIDGE void registerEnginePlugin(CarlaEngine* const engine, const unsigned int id, CarlaPlugin* const plugin) { diff --git a/source/backend/engine/CarlaEngineInternal.hpp b/source/backend/engine/CarlaEngineInternal.hpp index 94bf4a04b..e3a68485c 100644 --- a/source/backend/engine/CarlaEngineInternal.hpp +++ b/source/backend/engine/CarlaEngineInternal.hpp @@ -202,11 +202,6 @@ struct CarlaEngineProtectedData { CarlaEngineProtectedData(CarlaEngineProtectedData&) = delete; CarlaEngineProtectedData(const CarlaEngineProtectedData&) = delete; - static QMainWindow* getHostWindow(CarlaEngine* const engine) - { - return engine->kData->hostWindow; - } - #ifndef BUILD_BRIDGE static void registerEnginePlugin(CarlaEngine* const engine, const unsigned int id, CarlaPlugin* const plugin) { diff --git a/source/backend/native/distrho/DistrhoPluginCarla.cpp b/source/backend/native/distrho/DistrhoPluginCarla.cpp index 10aa562d0..934907557 100644 --- a/source/backend/native/distrho/DistrhoPluginCarla.cpp +++ b/source/backend/native/distrho/DistrhoPluginCarla.cpp @@ -30,7 +30,7 @@ # include "DistrhoUIMain.cpp" #endif -// ------------------------------------------------- +// ----------------------------------------------------------------------- START_NAMESPACE_DISTRHO @@ -52,6 +52,7 @@ public: fUi(this, 0, editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, uiResizeCallback) #endif { + setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint); #ifdef DISTRHO_UI_OPENGL setCentralWidget(&fWidget); #else diff --git a/source/backend/plugin/CarlaPluginGui.cpp b/source/backend/plugin/CarlaPluginGui.cpp index abb18ad72..53917fe58 100644 --- a/source/backend/plugin/CarlaPluginGui.cpp +++ b/source/backend/plugin/CarlaPluginGui.cpp @@ -25,16 +25,11 @@ CARLA_BACKEND_START_NAMESPACE #include "moc_CarlaPluginGui.cpp" -// ----------------------------------------------------------------------- -// Engine Helpers, defined in CarlaEngine.cpp - -extern QMainWindow* getEngineHostWindow(CarlaEngine* const engine); - // ------------------------------------------------------------------- // CarlaPluginGUI CarlaPluginGui::CarlaPluginGui(CarlaEngine* const engine, Callback* const callback, const Options& options) - : QMainWindow(getEngineHostWindow(engine)), + : QMainWindow(nullptr), kCallback(callback), fContainer(nullptr), fOptions(options) @@ -54,9 +49,11 @@ CarlaPluginGui::CarlaPluginGui(CarlaEngine* const engine, Callback* const callba #ifdef Q_OS_WIN if (! options.resizable) - setWindowFlags(windowFlags() | Qt::MSWindowsFixedSizeDialogHint); + setWindowFlags(windowFlags()|Qt::MSWindowsFixedSizeDialogHint); #endif + setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint); + connect(this, SIGNAL(setSizeSafeSignal(int,int)), SLOT(setSizeSafeSlot(int,int))); } diff --git a/source/backend/standalone/CarlaStandalone.cpp b/source/backend/standalone/CarlaStandalone.cpp index ab94b0fe2..398722c3e 100644 --- a/source/backend/standalone/CarlaStandalone.cpp +++ b/source/backend/standalone/CarlaStandalone.cpp @@ -23,6 +23,7 @@ #include "CarlaPlugin.hpp" #include "CarlaMIDI.h" #include "CarlaNative.h" +#include "CarlaStyle.hpp" #include @@ -86,6 +87,18 @@ struct CarlaBackendStandalone { app = nullptr; } + void registerThemeIfPossible(QApplication* const hostApp) + { + if (needsInit) + return; + + CARLA_ASSERT(app != nullptr); + CARLA_ASSERT(app == hostApp); + + if (app == hostApp) + hostApp->setStyle(new CarlaStyle()); + } + CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(CarlaBackendStandalone) } standalone; @@ -185,6 +198,21 @@ const char* carla_get_supported_file_types() // ------------------------------------------------------------------------------------------------------------------- +void carla_set_up_qt(uintptr_t app) +{ + carla_debug("carla_set_up_qt(" P_UINTPTR ")", app); + + CARLA_ASSERT(app != 0); + + if (app == 0) + return; + + QApplication* hostApp = (QApplication*)CarlaBackend::getPointerFromAddress(app); + standalone.registerThemeIfPossible(hostApp); +} + +// ------------------------------------------------------------------------------------------------------------------- + unsigned int carla_get_engine_driver_count() { carla_debug("carla_get_engine_driver_count()"); diff --git a/source/backend/standalone/Makefile b/source/backend/standalone/Makefile index 87f766515..99a37ea26 100644 --- a/source/backend/standalone/Makefile +++ b/source/backend/standalone/Makefile @@ -8,7 +8,7 @@ include ../Makefile.mk # -------------------------------------------------------------- -BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) +BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) -I../../theme ifeq ($(HAVE_QT5),true) BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core) @@ -93,6 +93,7 @@ LIBS += ../libcarla_plugin.a LIBS += ../libcarla_native.a LIBS += ../../libs/rtmempool.a LIBS += ../../libs/widgets.a +LIBS += ../../libs/theme.a ifeq ($(CARLA_PLUGIN_SUPPORT),true) LIBS += ../../libs/lilv.a diff --git a/source/carla.py b/source/carla.py index c10c17806..f9b382f5c 100755 --- a/source/carla.py +++ b/source/carla.py @@ -1951,6 +1951,7 @@ if __name__ == '__main__': Carla.host = Host(libName) Carla.host.set_engine_callback(engineCallback) Carla.host.set_engine_option(OPTION_PROCESS_NAME, 0, "carla") + Carla.host.set_up_qt(app) # Set bridge paths if carla_bridge_native: diff --git a/source/carla_backend.py b/source/carla_backend.py index e642aced7..71cecde39 100644 --- a/source/carla_backend.py +++ b/source/carla_backend.py @@ -21,6 +21,7 @@ from ctypes import * from platform import architecture +from sip import unwrapinstance from sys import platform, maxsize # ------------------------------------------------------------------------------------------------------------ @@ -253,6 +254,7 @@ else: c_enum = c_int c_nullptr = None +c_uintptr = c_uint64 if kIs64bit else c_uint32 CallbackFunc = CFUNCTYPE(None, c_void_p, c_enum, c_uint, c_int, c_int, c_float, c_char_p) @@ -371,6 +373,9 @@ class Host(object): self.lib.carla_get_supported_file_types.argtypes = None self.lib.carla_get_supported_file_types.restype = c_char_p + self.lib.carla_set_up_qt.argtypes = [c_uintptr] + self.lib.carla_set_up_qt.restype = None + self.lib.carla_get_engine_driver_count.argtypes = None self.lib.carla_get_engine_driver_count.restype = c_uint @@ -607,6 +612,9 @@ class Host(object): def get_supported_file_types(self): return self.lib.carla_get_supported_file_types() + def set_up_qt(self, app): + self.lib.carla_set_up_qt(unwrapinstance(app)) + def get_engine_driver_count(self): return self.lib.carla_get_engine_driver_count() diff --git a/source/carla_shared.py b/source/carla_shared.py index 76c6544dd..f17405cbd 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -2098,6 +2098,7 @@ class PluginWidget(QFrame): def paintEvent(self, event): painter = QPainter(self) + painter.save() areaX = self.ui.area_right.x() @@ -2131,6 +2132,11 @@ class PluginWidget(QFrame): # fill the rest painter.drawRect(areaX+19, 5, self.width(), self.height()) + # bottom 1px line + painter.setPen(self.fColorSeprtr) + painter.drawLine(0, self.height()-1, self.width(), self.height()-1) + + painter.restore() QFrame.paintEvent(self, event) @pyqtSlot(bool) diff --git a/source/includes/CarlaDefines.hpp b/source/includes/CarlaDefines.hpp index 6668fc2a6..3e6fbfb5f 100644 --- a/source/includes/CarlaDefines.hpp +++ b/source/includes/CarlaDefines.hpp @@ -46,9 +46,6 @@ #elif defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__) # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 # define CARLA_PROPER_CPP11_SUPPORT -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 -# define IS_CPP11 1 -# endif # endif #endif @@ -57,10 +54,6 @@ # define nullptr (0) #endif -#ifndef IS_CPP11 -# define IS_CPP11 0 -#endif - // Common includes #ifdef CARLA_OS_WIN # include diff --git a/source/libs/Makefile b/source/libs/Makefile index 70ac115c9..562b47103 100644 --- a/source/libs/Makefile +++ b/source/libs/Makefile @@ -35,6 +35,9 @@ rtmempool.%.a: widgets.a: $(MAKE) -C ../widgets +theme.a: + $(MAKE) -C ../theme + # -------------------------------------------------------------- jackbridge-win32.dll: