Browse Source

Add dark GUI buttons for light themes

tags/1.9.4
falkTX 12 years ago
parent
commit
53a6b674c8
14 changed files with 32 additions and 7 deletions
  1. BIN
      resources/bitmaps/button_distrho2.png
  2. BIN
      resources/bitmaps/button_distrho_down2.png
  3. BIN
      resources/bitmaps/button_distrho_hover2.png
  4. BIN
      resources/bitmaps/button_edit2.png
  5. BIN
      resources/bitmaps/button_edit_down2.png
  6. BIN
      resources/bitmaps/button_edit_hover2.png
  7. BIN
      resources/bitmaps/button_file2.png
  8. BIN
      resources/bitmaps/button_file_down2.png
  9. BIN
      resources/bitmaps/button_file_hover2.png
  10. BIN
      resources/bitmaps/button_gui2.png
  11. BIN
      resources/bitmaps/button_gui_down2.png
  12. BIN
      resources/bitmaps/button_gui_hover2.png
  13. +12
    -0
      resources/resources.qrc
  14. +20
    -7
      source/carla_shared.py

BIN
resources/bitmaps/button_distrho2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.2KB

BIN
resources/bitmaps/button_distrho_down2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.3KB

BIN
resources/bitmaps/button_distrho_hover2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.6KB

BIN
resources/bitmaps/button_edit2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.1KB

BIN
resources/bitmaps/button_edit_down2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.1KB

BIN
resources/bitmaps/button_edit_hover2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.4KB

BIN
resources/bitmaps/button_file2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 2.9KB

BIN
resources/bitmaps/button_file_down2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 2.9KB

BIN
resources/bitmaps/button_file_hover2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.2KB

BIN
resources/bitmaps/button_gui2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.2KB

BIN
resources/bitmaps/button_gui_down2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.3KB

BIN
resources/bitmaps/button_gui_hover2.png View File

Before After
Width: 22  |  Height: 22  |  Size: 3.6KB

+ 12
- 0
resources/resources.qrc View File

@@ -49,17 +49,29 @@

<file>bitmaps/carla_about.png</file>
<file>bitmaps/button_distrho.png</file>
<file>bitmaps/button_distrho2.png</file>
<file>bitmaps/button_distrho_down.png</file>
<file>bitmaps/button_distrho_down2.png</file>
<file>bitmaps/button_distrho_hover.png</file>
<file>bitmaps/button_distrho_hover2.png</file>
<file>bitmaps/button_edit.png</file>
<file>bitmaps/button_edit2.png</file>
<file>bitmaps/button_edit_down.png</file>
<file>bitmaps/button_edit_down2.png</file>
<file>bitmaps/button_edit_hover.png</file>
<file>bitmaps/button_edit_hover2.png</file>
<file>bitmaps/button_file.png</file>
<file>bitmaps/button_file2.png</file>
<file>bitmaps/button_file_down.png</file>
<file>bitmaps/button_file_down2.png</file>
<file>bitmaps/button_file_hover.png</file>
<file>bitmaps/button_file_hover2.png</file>
<file>bitmaps/button_gui.png</file>
<file>bitmaps/button_gui2.png</file>
<file>bitmaps/button_gui_down.png</file>
<file>bitmaps/button_gui_down2.png</file>
<file>bitmaps/button_gui_hover.png</file>
<file>bitmaps/button_gui_hover2.png</file>
<file>bitmaps/button_off.png</file>
<file>bitmaps/button_on.png</file>
<file>bitmaps/dial_01.png</file>


+ 20
- 7
source/carla_shared.py View File

@@ -2014,6 +2014,7 @@ class PluginWidget(QFrame):
if self.palette().window().color().lightness() > 100:
# Light background
labelColor = "333"
isLight = True

self.fColorTop = QColor(60, 60, 60)
self.fColorBottom = QColor(47, 47, 47)
@@ -2022,6 +2023,7 @@ class PluginWidget(QFrame):
else:
# Dark background
labelColor = "BBB"
isLight = False

self.fColorTop = QColor(60, 60, 60)
self.fColorBottom = QColor(47, 47, 47)
@@ -2035,15 +2037,26 @@ class PluginWidget(QFrame):
color: #%s;
}""" % labelColor)

self.ui.b_enable.setPixmaps(":/bitmaps/button_off.png", ":/bitmaps/button_on.png", ":/bitmaps/button_off.png")
self.ui.b_edit.setPixmaps(":/bitmaps/button_edit.png", ":/bitmaps/button_edit_down.png", ":/bitmaps/button_edit_hover.png")
if isLight:
self.ui.b_enable.setPixmaps(":/bitmaps/button_off2.png", ":/bitmaps/button_on2.png", ":/bitmaps/button_off2.png")
self.ui.b_edit.setPixmaps(":/bitmaps/button_edit2.png", ":/bitmaps/button_edit_down2.png", ":/bitmaps/button_edit_hover2.png")

if self.fPluginInfo['iconName'] == "distrho":
self.ui.b_gui.setPixmaps(":/bitmaps/button_distrho.png", ":/bitmaps/button_distrho_down.png", ":/bitmaps/button_distrho_hover.png")
elif self.fPluginInfo['iconName'] == "file" or (self.fPluginInfo['hints'] & PLUGIN_HAS_GUI_AS_FILE) != 0:
self.ui.b_gui.setPixmaps(":/bitmaps/button_file.png", ":/bitmaps/button_file_down.png", ":/bitmaps/button_file_hover.png")
if self.fPluginInfo['iconName'] == "distrho":
self.ui.b_gui.setPixmaps(":/bitmaps/button_distrho2.png", ":/bitmaps/button_distrho_down2.png", ":/bitmaps/button_distrho_hover2.png")
elif self.fPluginInfo['iconName'] == "file" or (self.fPluginInfo['hints'] & PLUGIN_HAS_GUI_AS_FILE) != 0:
self.ui.b_gui.setPixmaps(":/bitmaps/button_file2.png", ":/bitmaps/button_file_down2.png", ":/bitmaps/button_file_hover2.png")
else:
self.ui.b_gui.setPixmaps(":/bitmaps/button_gui2.png", ":/bitmaps/button_gui_down2.png", ":/bitmaps/button_gui_hover2.png")
else:
self.ui.b_gui.setPixmaps(":/bitmaps/button_gui.png", ":/bitmaps/button_gui_down.png", ":/bitmaps/button_gui_hover.png")
self.ui.b_enable.setPixmaps(":/bitmaps/button_off.png", ":/bitmaps/button_on.png", ":/bitmaps/button_off.png")
self.ui.b_edit.setPixmaps(":/bitmaps/button_edit.png", ":/bitmaps/button_edit_down.png", ":/bitmaps/button_edit_hover.png")

if self.fPluginInfo['iconName'] == "distrho":
self.ui.b_gui.setPixmaps(":/bitmaps/button_distrho.png", ":/bitmaps/button_distrho_down.png", ":/bitmaps/button_distrho_hover.png")
elif self.fPluginInfo['iconName'] == "file" or (self.fPluginInfo['hints'] & PLUGIN_HAS_GUI_AS_FILE) != 0:
self.ui.b_gui.setPixmaps(":/bitmaps/button_file.png", ":/bitmaps/button_file_down.png", ":/bitmaps/button_file_hover.png")
else:
self.ui.b_gui.setPixmaps(":/bitmaps/button_gui.png", ":/bitmaps/button_gui_down.png", ":/bitmaps/button_gui_hover.png")

self.ui.led_control.setColor(self.ui.led_control.YELLOW)
self.ui.led_control.setEnabled(False)


Loading…
Cancel
Save