Skip to content

Commit

Permalink
Update progress bar style.
Browse files Browse the repository at this point in the history
Fix bugs in options load/save.
  • Loading branch information
mikedarcy committed Mar 15, 2024
1 parent d9545b0 commit 46e9672
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bdbag_gui/ui/main_window.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import json
import errno
import logging
import platform

Expand Down Expand Up @@ -61,7 +62,7 @@ def loadOptions(self, options_file=DEFAULT_OPTIONS_FILE):
options = of.read()
else:
options = json.dumps(DEFAULT_OPTIONS)
logger.warning("Unable to read options file: [%s]. Using internal defaults." % config_file)
logging.warning("Unable to read options file: [%s]. Using internal defaults." % options_file)

self.options = json.loads(options)

Expand All @@ -78,7 +79,7 @@ def saveOptions(self, options_file=DEFAULT_OPTIONS_FILE):
with open(options_file, 'w') as of:
of.write(json.dumps(self.options, indent=4, sort_keys=True))
except Exception as e:
logger.warning("Unable to write options file: [%s]. Error: %s" % (options_file, e))
logging.warning("Unable to write options file: [%s]. Error: %s" % (options_file, e))

def checkIfBag(self, silent=False):
current_path = self.getCurrentPath()
Expand Down Expand Up @@ -666,9 +667,9 @@ def setup_ui(self, MainWin):
text-align: center;
}
QProgressBar::chunk {
background-color: cornflowerblue;
width: 15px;
margin: 0.5px;
background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0,
stop: 0 #bbe0fa,
stop: 1 #3088c8 );
}
""")
self.verticalLayout.addWidget(self.progressBar)
Expand Down

0 comments on commit 46e9672

Please sign in to comment.