diff --git a/resources/bitmaps/button_distrho-black.png b/resources/bitmaps/button_distrho-black.png new file mode 100644 index 000000000..121e29313 Binary files /dev/null and b/resources/bitmaps/button_distrho-black.png differ diff --git a/resources/bitmaps/button_distrho.png b/resources/bitmaps/button_distrho-white.png similarity index 100% rename from resources/bitmaps/button_distrho.png rename to resources/bitmaps/button_distrho-white.png diff --git a/resources/bitmaps/button_distrho_down-black.png b/resources/bitmaps/button_distrho_down-black.png new file mode 100644 index 000000000..98981735f Binary files /dev/null and b/resources/bitmaps/button_distrho_down-black.png differ diff --git a/resources/bitmaps/button_distrho_down.png b/resources/bitmaps/button_distrho_down-white.png similarity index 100% rename from resources/bitmaps/button_distrho_down.png rename to resources/bitmaps/button_distrho_down-white.png diff --git a/resources/bitmaps/button_distrho_hover-black.png b/resources/bitmaps/button_distrho_hover-black.png new file mode 100644 index 000000000..30a938f7b Binary files /dev/null and b/resources/bitmaps/button_distrho_hover-black.png differ diff --git a/resources/bitmaps/button_distrho_hover.png b/resources/bitmaps/button_distrho_hover-white.png similarity index 100% rename from resources/bitmaps/button_distrho_hover.png rename to resources/bitmaps/button_distrho_hover-white.png diff --git a/resources/bitmaps/button_edit-black.png b/resources/bitmaps/button_edit-black.png new file mode 100644 index 000000000..b057035ed Binary files /dev/null and b/resources/bitmaps/button_edit-black.png differ diff --git a/resources/bitmaps/button_edit.png b/resources/bitmaps/button_edit-white.png similarity index 100% rename from resources/bitmaps/button_edit.png rename to resources/bitmaps/button_edit-white.png diff --git a/resources/bitmaps/button_edit_down-black.png b/resources/bitmaps/button_edit_down-black.png new file mode 100644 index 000000000..2ac2f105f Binary files /dev/null and b/resources/bitmaps/button_edit_down-black.png differ diff --git a/resources/bitmaps/button_edit_down.png b/resources/bitmaps/button_edit_down-white.png similarity index 100% rename from resources/bitmaps/button_edit_down.png rename to resources/bitmaps/button_edit_down-white.png diff --git a/resources/bitmaps/button_edit_hover-black.png b/resources/bitmaps/button_edit_hover-black.png new file mode 100644 index 000000000..38805a35e Binary files /dev/null and b/resources/bitmaps/button_edit_hover-black.png differ diff --git a/resources/bitmaps/button_edit_hover.png b/resources/bitmaps/button_edit_hover-white.png similarity index 100% rename from resources/bitmaps/button_edit_hover.png rename to resources/bitmaps/button_edit_hover-white.png diff --git a/resources/bitmaps/button_file-black.png b/resources/bitmaps/button_file-black.png new file mode 100644 index 000000000..87783eb52 Binary files /dev/null and b/resources/bitmaps/button_file-black.png differ diff --git a/resources/bitmaps/button_file.png b/resources/bitmaps/button_file-white.png similarity index 100% rename from resources/bitmaps/button_file.png rename to resources/bitmaps/button_file-white.png diff --git a/resources/bitmaps/button_file_down-black.png b/resources/bitmaps/button_file_down-black.png new file mode 100644 index 000000000..0cd8c9dda Binary files /dev/null and b/resources/bitmaps/button_file_down-black.png differ diff --git a/resources/bitmaps/button_file_down.png b/resources/bitmaps/button_file_down-white.png similarity index 100% rename from resources/bitmaps/button_file_down.png rename to resources/bitmaps/button_file_down-white.png diff --git a/resources/bitmaps/button_file_hover-black.png b/resources/bitmaps/button_file_hover-black.png new file mode 100644 index 000000000..0e23810e1 Binary files /dev/null and b/resources/bitmaps/button_file_hover-black.png differ diff --git a/resources/bitmaps/button_file_hover.png b/resources/bitmaps/button_file_hover-white.png similarity index 100% rename from resources/bitmaps/button_file_hover.png rename to resources/bitmaps/button_file_hover-white.png diff --git a/resources/bitmaps/button_gui-black.png b/resources/bitmaps/button_gui-black.png new file mode 100644 index 000000000..17751ee76 Binary files /dev/null and b/resources/bitmaps/button_gui-black.png differ diff --git a/resources/bitmaps/button_gui.png b/resources/bitmaps/button_gui-white.png similarity index 100% rename from resources/bitmaps/button_gui.png rename to resources/bitmaps/button_gui-white.png diff --git a/resources/bitmaps/button_gui_down-black.png b/resources/bitmaps/button_gui_down-black.png new file mode 100644 index 000000000..cf56fec5a Binary files /dev/null and b/resources/bitmaps/button_gui_down-black.png differ diff --git a/resources/bitmaps/button_gui_down.png b/resources/bitmaps/button_gui_down-white.png similarity index 100% rename from resources/bitmaps/button_gui_down.png rename to resources/bitmaps/button_gui_down-white.png diff --git a/resources/bitmaps/button_gui_hover-black.png b/resources/bitmaps/button_gui_hover-black.png new file mode 100644 index 000000000..cea4a5136 Binary files /dev/null and b/resources/bitmaps/button_gui_hover-black.png differ diff --git a/resources/bitmaps/button_gui_hover.png b/resources/bitmaps/button_gui_hover-white.png similarity index 100% rename from resources/bitmaps/button_gui_hover.png rename to resources/bitmaps/button_gui_hover-white.png diff --git a/resources/resources.qrc b/resources/resources.qrc index ee2469ea9..f1bc79c75 100644 --- a/resources/resources.qrc +++ b/resources/resources.qrc @@ -68,18 +68,30 @@ bitmaps/button_calf3_down.png bitmaps/button_calf1_hover.png bitmaps/button_calf2_hover.png - bitmaps/button_distrho.png - bitmaps/button_distrho_down.png - bitmaps/button_distrho_hover.png - bitmaps/button_edit.png - bitmaps/button_edit_down.png - bitmaps/button_edit_hover.png - bitmaps/button_file.png - bitmaps/button_file_down.png - bitmaps/button_file_hover.png - bitmaps/button_gui.png - bitmaps/button_gui_down.png - bitmaps/button_gui_hover.png + bitmaps/button_distrho-black.png + bitmaps/button_distrho-white.png + bitmaps/button_distrho_down-black.png + bitmaps/button_distrho_down-white.png + bitmaps/button_distrho_hover-black.png + bitmaps/button_distrho_hover-white.png + bitmaps/button_edit-black.png + bitmaps/button_edit-white.png + bitmaps/button_edit_down-black.png + bitmaps/button_edit_down-white.png + bitmaps/button_edit_hover-black.png + bitmaps/button_edit_hover-white.png + bitmaps/button_file-black.png + bitmaps/button_file-white.png + bitmaps/button_file_down-black.png + bitmaps/button_file_down-white.png + bitmaps/button_file_hover-black.png + bitmaps/button_file_hover-white.png + bitmaps/button_gui-black.png + bitmaps/button_gui-white.png + bitmaps/button_gui_down-black.png + bitmaps/button_gui_down-white.png + bitmaps/button_gui_hover-black.png + bitmaps/button_gui_hover-white.png bitmaps/button_off.png bitmaps/button_on.png diff --git a/resources/ui/carla_about.ui b/resources/ui/carla_about.ui index 485f25008..cd1f19f23 100644 --- a/resources/ui/carla_about.ui +++ b/resources/ui/carla_about.ui @@ -281,7 +281,7 @@ - + 22 @@ -298,12 +298,12 @@ - :/bitmaps/button_gui_down.png + :/bitmaps/button_gui_down-white.png - + 22 @@ -320,12 +320,12 @@ - :/bitmaps/button_edit_down.png + :/bitmaps/button_edit_down-white.png - + 22 @@ -342,7 +342,7 @@ - :/bitmaps/button_file_down.png + :/bitmaps/button_file_down-white.png diff --git a/source/frontend/carla_skin.py b/source/frontend/carla_skin.py index ca309b0be..4a47dd000 100755 --- a/source/frontend/carla_skin.py +++ b/source/frontend/carla_skin.py @@ -168,7 +168,7 @@ def getColorFromCategory(category): # ------------------------------------------------------------------------------------------------------------ # -def setPixmapDialStyle(widget, parameterId, parameterCount, skinStyle): +def setPixmapDialStyle(widget, parameterId, parameterCount, darkStyle, skinStyle): if skinStyle.startswith("calf"): widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_NO_GRADIENT) widget.setPixmap(7) @@ -185,8 +185,10 @@ def setPixmapDialStyle(widget, parameterId, parameterCount, skinStyle): else: if parameterId == PARAMETER_DRYWET: widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_CARLA_WET) + elif parameterId == PARAMETER_VOLUME: widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_CARLA_VOL) + else: _r = 255 - int((float(parameterId)/float(parameterCount))*200.0) _g = 55 + int((float(parameterId)/float(parameterCount))*200.0) @@ -194,8 +196,15 @@ def setPixmapDialStyle(widget, parameterId, parameterCount, skinStyle): widget.setCustomPaintColor(QColor(_r, _g, _b)) widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_COLOR) + if darkStyle: + colorEnabled = QColor("#BBB") + colorDisabled = QColor("#555") + else: + colorEnabled = QColor("#111") + colorDisabled = QColor("#AAA") + + widget.setLabelColor(colorEnabled, colorDisabled) widget.setPixmap(3) - widget.forceWhiteLabelGradientText() # ------------------------------------------------------------------------------------------------------------ # Abstract plugin slot @@ -218,6 +227,7 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): self.fPluginInfo = host.get_plugin_info(self.fPluginId) self.fSkinColor = skinColor self.fSkinStyle = skinStyle + self.fDarkStyle = QColor(skinColor[0], skinColor[1], skinColor[2]).blackF() > 0.4 # ------------------------------------------------------------- # Internal stuff @@ -347,37 +357,54 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): def ready(self): self.fIsActive = bool(self.host.get_internal_parameter_value(self.fPluginId, PARAMETER_ACTIVE) >= 0.5) - isCalfSkin = self.fSkinStyle.startswith("calf") and not isinstance(self, PluginSlot_Compact) + isCalfSkin = self.fSkinStyle.startswith("calf") and not isinstance(self, PluginSlot_Compact) + imageSuffix = "white" if self.fDarkStyle else "black" if self.b_enable is not None: self.b_enable.setChecked(self.fIsActive) self.b_enable.clicked.connect(self.slot_enableClicked) if isCalfSkin: - self.b_enable.setPixmaps(":/bitmaps/button_calf3.png", ":/bitmaps/button_calf3_down.png", ":/bitmaps/button_calf3.png") + self.b_enable.setPixmaps(":/bitmaps/button_calf3.png", + ":/bitmaps/button_calf3_down.png", + ":/bitmaps/button_calf3.png") else: - self.b_enable.setPixmaps(":/bitmaps/button_off.png", ":/bitmaps/button_on.png", ":/bitmaps/button_off.png") + self.b_enable.setPixmaps(":/bitmaps/button_off.png", + ":/bitmaps/button_on.png", + ":/bitmaps/button_off.png") if self.b_gui is not None: self.b_gui.clicked.connect(self.slot_showCustomUi) self.b_gui.setEnabled(bool(self.fPluginInfo['hints'] & PLUGIN_HAS_CUSTOM_UI)) if isCalfSkin: - self.b_gui.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png") + self.b_gui.setPixmaps(":/bitmaps/button_calf2.png", + ":/bitmaps/button_calf2_down.png", + ":/bitmaps/button_calf2_hover.png") elif self.fPluginInfo['iconName'] == "distrho" or self.fSkinStyle in ("3bandeq","3bandsplitter","pingpongpan", "nekobi"): - self.b_gui.setPixmaps(":/bitmaps/button_distrho.png", ":/bitmaps/button_distrho_down.png", ":/bitmaps/button_distrho_hover.png") + self.b_gui.setPixmaps(":/bitmaps/button_distrho-{}.png", + ":/bitmaps/button_distrho_down-{}.png", + ":/bitmaps/button_distrho_hover-{}.png") elif self.fPluginInfo['iconName'] == "file": - self.b_gui.setPixmaps(":/bitmaps/button_file.png", ":/bitmaps/button_file_down.png", ":/bitmaps/button_file_hover.png") + self.b_gui.setPixmaps(":/bitmaps/button_file-{}.png".format(imageSuffix), + ":/bitmaps/button_file_down-{}.png".format(imageSuffix), + ":/bitmaps/button_file_hover-{}.png".format(imageSuffix)) else: - self.b_gui.setPixmaps(":/bitmaps/button_gui.png", ":/bitmaps/button_gui_down.png", ":/bitmaps/button_gui_hover.png") + self.b_gui.setPixmaps(":/bitmaps/button_gui-{}.png".format(imageSuffix), + ":/bitmaps/button_gui_down-{}.png".format(imageSuffix), + ":/bitmaps/button_gui_hover-{}.png".format(imageSuffix)) if self.b_edit is not None: self.b_edit.clicked.connect(self.slot_showEditDialog) if isCalfSkin: - self.b_edit.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png") + self.b_edit.setPixmaps(":/bitmaps/button_calf2.png".format(imageSuffix), + ":/bitmaps/button_calf2_down.png".format(imageSuffix), + ":/bitmaps/button_calf2_hover.png".format(imageSuffix)) else: - self.b_edit.setPixmaps(":/bitmaps/button_edit.png", ":/bitmaps/button_edit_down.png", ":/bitmaps/button_edit_hover.png") + self.b_edit.setPixmaps(":/bitmaps/button_edit-{}.png".format(imageSuffix), + ":/bitmaps/button_edit_down-{}.png".format(imageSuffix), + ":/bitmaps/button_edit_hover-{}.png".format(imageSuffix)) else: # Edit button *must* be available @@ -494,6 +521,13 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): styleSheet2 = "background-color: rgb(%i, %i, %i);" % self.fSkinColor styleSheet2 += "background-image: url(:/bitmaps/background_noise1.png);" + if self.fDarkStyle: + colorEnabled = "#BBB" + colorDisabled = "#555" + else: + colorEnabled = "#111" + colorDisabled = "#AAA" + styleSheet = """ QFrame#PluginWidget { %s @@ -503,9 +537,9 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): QLabel#label_audio_in, QLabel#label_audio_out, QLabel#label_midi, - QLabel#label_presets { color: #BBB; } - QLabel#label_name:disabled { color: #555; } - """ % styleSheet2 + QLabel#label_presets { color: %s; } + QLabel#label_name:disabled { color: %s; } + """ % (styleSheet2, colorEnabled, colorDisabled) styleSheet += """ QComboBox#cb_presets, @@ -560,7 +594,7 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): if isInteger: widget.setPrecision(paramRanges['max']-paramRanges['min'], True) - setPixmapDialStyle(widget, i, parameterCount, self.fSkinStyle) + setPixmapDialStyle(widget, i, parameterCount, self.fDarkStyle, self.fSkinStyle) index += 1 self.fParameterList.append([i, widget]) @@ -571,7 +605,7 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): widget.setLabel("Dry/Wet") widget.setMinimum(0.0) widget.setMaximum(1.0) - setPixmapDialStyle(widget, PARAMETER_DRYWET, 0, self.fSkinStyle) + setPixmapDialStyle(widget, PARAMETER_DRYWET, 0, self.fDarkStyle, self.fSkinStyle) self.fParameterList.append([PARAMETER_DRYWET, widget]) self.w_knobs_right.layout().addWidget(widget) @@ -581,7 +615,7 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): widget.setLabel("Volume") widget.setMinimum(0.0) widget.setMaximum(1.27) - setPixmapDialStyle(widget, PARAMETER_VOLUME, 0, self.fSkinStyle) + setPixmapDialStyle(widget, PARAMETER_VOLUME, 0, self.fDarkStyle, self.fSkinStyle) self.fParameterList.append([PARAMETER_VOLUME, widget]) self.w_knobs_right.layout().addWidget(widget) diff --git a/source/frontend/carla_widgets.py b/source/frontend/carla_widgets.py index 920b4e081..3af22c994 100755 --- a/source/frontend/carla_widgets.py +++ b/source/frontend/carla_widgets.py @@ -79,10 +79,11 @@ class CarlaAboutW(QDialog): "
Copyright (C) 2011-2018 falkTX
" "" % (VERSION, extraInfo))) - if self.ui.about.palette().color(QPalette.Background).blackF() > 0.5: - self.ui.l_icons.setPixmap(QPixmap(":/bitmaps/carla_about_white.png")) - else: + if self.ui.about.palette().color(QPalette.Background).blackF() < 0.5: self.ui.l_icons.setPixmap(QPixmap(":/bitmaps/carla_about_black.png")) + self.ui.ico_example_edit.setPixmap(QPixmap(":/bitmaps/button_file-black.png")) + self.ui.ico_example_file.setPixmap(QPixmap(":/bitmaps/button_edit-black.png")) + self.ui.ico_example_gui.setPixmap(QPixmap(":/bitmaps/button_gui-black.png")) if host.isControl: self.ui.l_extended.hide() diff --git a/source/frontend/widgets/pixmapdial.py b/source/frontend/widgets/pixmapdial.py index 510dd2d83..9191a4e3c 100644 --- a/source/frontend/widgets/pixmapdial.py +++ b/source/frontend/widgets/pixmapdial.py @@ -140,6 +140,11 @@ class PixmapDial(QDial): self.fLabelGradientColor2 = QColor(0, 0, 0, 0) self.fLabelGradientColorT = [Qt.white, Qt.darkGray] + def setLabelColor(self, enabled, disabled): + self.fLabelGradientColor1 = QColor(0, 0, 0, 255) + self.fLabelGradientColor2 = QColor(0, 0, 0, 0) + self.fLabelGradientColorT = [enabled, disabled] + def updateSizes(self): self.fPixmapWidth = self.fPixmap.width() self.fPixmapHeight = self.fPixmap.height()