Browse Source

More attempts at finding styles dir

tags/1.9.4
falkTX 10 years ago
parent
commit
615cffff9b
2 changed files with 15 additions and 8 deletions
  1. +0
    -3
      source/carla-plugin
  2. +15
    -5
      source/carla_style.py

+ 0
- 3
source/carla-plugin View File

@@ -720,9 +720,6 @@ if __name__ == '__main__':

app = CarlaApplication("Carla2-Plugin")

if "__file__" in dir():
app.addLibraryPath(os.path.dirname(__file__))

# -------------------------------------------------------------
# Set-up custom signal handling



+ 15
- 5
source/carla_style.py View File

@@ -36,10 +36,20 @@ class CarlaApplication(object):
def __init__(self, appName = "Carla2"):
object.__init__(self)

libdir = os.path.join(CWD, "modules", "theme")

if os.path.exists(libdir):
QApplication.addLibraryPath(libdir)
libdir1 = os.path.join(CWD, "modules", "theme")
libdir2 = os.path.join(CWD, "styles")
libdir3 = os.path.join(CWD, "..", "styles")
foundDir = False

if os.path.exists(libdir1):
QApplication.addLibraryPath(libdir1)
foundDir = True
elif os.path.exists(libdir2):
QApplication.addLibraryPath(libdir2)
foundDir = True
elif os.path.exists(libdir3):
QApplication.addLibraryPath(libdir3)
foundDir = True

self.fApp = QApplication(sys.argv)
self.fApp.setApplicationName(appName)
@@ -171,7 +181,7 @@ class CarlaApplication(object):
self.fPalBlue.setColor(QPalette.Active, QPalette.LinkVisited, QColor(64, 128, 255))
self.fPalBlue.setColor(QPalette.Inactive, QPalette.LinkVisited, QColor(64, 128, 255))

if os.path.exists(libdir):
if foundDir:
self.loadSettings()

def loadSettings(self):


Loading…
Cancel
Save