thg-qt-mq / guistyle.diff

# HG changeset patch
# Parent 1df0f23af4d2c230ac9f1cbac8f8d5e07bec3150
diff --git a/tortoisehg/hgqt/run.py b/tortoisehg/hgqt/run.py
--- a/tortoisehg/hgqt/run.py
+++ b/tortoisehg/hgqt/run.py
@@ -306,6 +306,10 @@ def runcommand(ui, args):
     if options['quiet']:
         ui.quiet = True
 
+    # best to set style before the QApplication constructor
+    if options['guistyle']:
+        QApplication.setStyle(options['guistyle'])
+
     if cmd not in nonrepo_commands.split() and not path:
         raise error.RepoError(_("There is no Mercurial repository here"
                                 " (.hg not found)"))
@@ -1040,6 +1044,7 @@ globalopts = [
     ('', 'fork', None, _('always fork GUI process')),
     ('', 'listfile', '', _('read file list from file')),
     ('', 'listfileutf8', '', _('read file list from file encoding utf-8')),
+    ('', 'guistyle', '', _('set application GUI style'))
 ]
 
 table = {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.