Browse Source

Add a few more desktop-theme icon definitions

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.3.0-RC1
falkTX 3 years ago
parent
commit
0e37f4534d
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 27 additions and 2 deletions
  1. +14
    -2
      source/frontend/carla_host.py
  2. +13
    -0
      source/frontend/carla_settings.py

+ 14
- 2
source/frontend/carla_host.py View File

@@ -474,6 +474,12 @@ class HostWindow(QMainWindow):
self.ui.act_canvas_zoom_out.setIcon(getIcon('zoom-out', 16, 'svgz'))
self.ui.act_canvas_zoom_100.setIcon(getIcon('zoom-original', 16, 'svgz'))
self.ui.act_settings_configure.setIcon(getIcon('configure', 16, 'svgz'))
self.ui.b_disk_add.setIcon(getIcon('list-add', 16, 'svgz'))
self.ui.b_disk_remove.setIcon(getIcon('list-remove', 16, 'svgz'))
self.ui.b_transport_play.setIcon(getIcon('media-playback-start', 16, 'svgz'))
self.ui.b_transport_stop.setIcon(getIcon('media-playback-stop', 16, 'svgz'))
self.ui.b_transport_backwards.setIcon(getIcon('media-seek-backward', 16, 'svgz'))
self.ui.b_transport_forwards.setIcon(getIcon('media-seek-forward', 16, 'svgz'))

# ----------------------------------------------------------------------------------------------------
# Connect actions to functions
@@ -2120,12 +2126,18 @@ class HostWindow(QMainWindow):

if playing != self.fLastTransportState or forced:
if playing:
icon = QIcon(":/16x16/media-playback-pause.svgz")
if self.fSavedSettings[CARLA_KEY_MAIN_SYSTEM_ICONS]:
icon = getIcon('media-playback-pause', 16, 'svgz')
else:
icon = QIcon(":/16x16/media-playback-pause.svgz")
self.ui.b_transport_play.setChecked(True)
self.ui.b_transport_play.setIcon(icon)
#self.ui.b_transport_play.setText(self.tr("&Pause"))
else:
icon = QIcon(":/16x16/media-playback-start.svgz")
if self.fSavedSettings[CARLA_KEY_MAIN_SYSTEM_ICONS]:
icon = getIcon('media-playback-start', 16, 'svgz')
else:
icon = QIcon(":/16x16/media-playback-start.svgz")
self.ui.b_transport_play.setChecked(False)
self.ui.b_transport_play.setIcon(icon)
#self.ui.b_play.setText(self.tr("&Play"))


+ 13
- 0
source/frontend/carla_settings.py View File

@@ -170,6 +170,7 @@ from carla_shared import (
CARLA_DEFAULT_SF2_PATH,
CARLA_DEFAULT_SFZ_PATH,
getAndSetPath,
getIcon,
fontMetricsHorizontalAdvance,
splitter,
QSafeSettings
@@ -559,6 +560,18 @@ class CarlaSettingsW(QDialog):

self.loadSettings()

# -------------------------------------------------------------------------------------------------------------
# Set-up Icons

if self.ui.ch_main_system_icons.isChecked():
self.ui.b_main_proj_folder_open.setIcon(getIcon('document-open', 16, 'svgz'))
self.ui.b_filepaths_add.setIcon(getIcon('list-add', 16, 'svgz'))
self.ui.b_filepaths_change.setIcon(getIcon('edit-rename', 16, 'svgz'))
self.ui.b_filepaths_remove.setIcon(getIcon('list-remove', 16, 'svgz'))
self.ui.b_paths_add.setIcon(getIcon('list-add', 16, 'svgz'))
self.ui.b_paths_change.setIcon(getIcon('edit-rename', 16, 'svgz'))
self.ui.b_paths_remove.setIcon(getIcon('list-remove', 16, 'svgz'))

# -------------------------------------------------------------------------------------------------------------
# Set-up connections



Loading…
Cancel
Save