diff --git a/addons/fastwq/gui/base.py b/addons/fastwq/gui/base.py
index 41f2023..6918495 100644
--- a/addons/fastwq/gui/base.py
+++ b/addons/fastwq/gui/base.py
@@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
+import sys
+from anki.utils import isMac
from aqt.qt import *
from ..context import APP_ICON
@@ -49,6 +51,9 @@ class Dialog(QDialog):
title if "FastWQ" in title
else "FastWQ - " + title
)
+ # 2 & 3 & mac compatible
+ if isMac and sys.hexversion >= 0x03000000:
+ QApplication.setStyle('Fusion')
class WidgetSize(object):
@@ -56,7 +61,7 @@ class WidgetSize(object):
constant values
'''
dialog_width = 850
- dialog_height_margin = 146
+ dialog_height_margin = 166 if isMac and sys.hexversion < 0x03000000 else 146
map_min_height = 0
map_max_height = 30
map_fld_width = 100
diff --git a/addons/fastwq/gui/options.py b/addons/fastwq/gui/options.py
index 047ff25..55ee589 100644
--- a/addons/fastwq/gui/options.py
+++ b/addons/fastwq/gui/options.py
@@ -17,6 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
+import sys
import anki
import aqt
import aqt.models
@@ -138,7 +139,7 @@ class OptionsDialog(Dialog):
tab_add_button = QToolButton(self)
tab_add_button.setIcon(get_icon('add.png'))
tab_set_button = QToolButton(self)
- if isMac:
+ if isMac and sys.hexversion < 0x03000000:
tab_set_button.setMaximumSize(20, 20)
tab_add_button.setMaximumSize(20, 20)
tab_set_button.setIcon(get_icon('setting.png'))
@@ -266,7 +267,7 @@ class OptionsDialog(Dialog):
self.tab_widget.setTabText(k, _('CONFIG_INDEX') % (k+1))
def changedTab(self, i):
- if not isMac:
+ if not isMac or sys.hexversion >= 0x03000000:
# restore
for k in range(0, len(self.tabs)):
self.tab_widget.setTabIcon(k, self._NULL_ICON)
diff --git a/addons21/fastwq/gui/base.py b/addons21/fastwq/gui/base.py
index 41f2023..6918495 100644
--- a/addons21/fastwq/gui/base.py
+++ b/addons21/fastwq/gui/base.py
@@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
+import sys
+from anki.utils import isMac
from aqt.qt import *
from ..context import APP_ICON
@@ -49,6 +51,9 @@ class Dialog(QDialog):
title if "FastWQ" in title
else "FastWQ - " + title
)
+ # 2 & 3 & mac compatible
+ if isMac and sys.hexversion >= 0x03000000:
+ QApplication.setStyle('Fusion')
class WidgetSize(object):
@@ -56,7 +61,7 @@ class WidgetSize(object):
constant values
'''
dialog_width = 850
- dialog_height_margin = 146
+ dialog_height_margin = 166 if isMac and sys.hexversion < 0x03000000 else 146
map_min_height = 0
map_max_height = 30
map_fld_width = 100
diff --git a/addons21/fastwq/gui/options.py b/addons21/fastwq/gui/options.py
index 047ff25..55ee589 100644
--- a/addons21/fastwq/gui/options.py
+++ b/addons21/fastwq/gui/options.py
@@ -17,6 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
+import sys
import anki
import aqt
import aqt.models
@@ -138,7 +139,7 @@ class OptionsDialog(Dialog):
tab_add_button = QToolButton(self)
tab_add_button.setIcon(get_icon('add.png'))
tab_set_button = QToolButton(self)
- if isMac:
+ if isMac and sys.hexversion < 0x03000000:
tab_set_button.setMaximumSize(20, 20)
tab_add_button.setMaximumSize(20, 20)
tab_set_button.setIcon(get_icon('setting.png'))
@@ -266,7 +267,7 @@ class OptionsDialog(Dialog):
self.tab_widget.setTabText(k, _('CONFIG_INDEX') % (k+1))
def changedTab(self, i):
- if not isMac:
+ if not isMac or sys.hexversion >= 0x03000000:
# restore
for k in range(0, len(self.tabs)):
self.tab_widget.setTabIcon(k, self._NULL_ICON)