mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Merge pull request #678 from rathsky/colordialog-linux
Always use standard QT color dialog on Linux
This commit is contained in:
commit
08b5718fe0
2 changed files with 8 additions and 2 deletions
|
@ -41,6 +41,7 @@ Andrew Gaul <andrew@gaul.org>
|
||||||
kenden
|
kenden
|
||||||
Nickolay Yudin <kelciour@gmail.com>
|
Nickolay Yudin <kelciour@gmail.com>
|
||||||
neitrinoweb <github.com/neitrinoweb/>
|
neitrinoweb <github.com/neitrinoweb/>
|
||||||
|
Andreas Reis <github.com/rathsky>
|
||||||
********************
|
********************
|
||||||
|
|
||||||
The text of the 3 clause BSD license follows:
|
The text of the 3 clause BSD license follows:
|
||||||
|
|
|
@ -23,7 +23,7 @@ from anki.hooks import runFilter
|
||||||
from anki.httpclient import HttpClient
|
from anki.httpclient import HttpClient
|
||||||
from anki.lang import _
|
from anki.lang import _
|
||||||
from anki.notes import Note
|
from anki.notes import Note
|
||||||
from anki.utils import checksum, isWin, namedtmp, stripHTMLMedia
|
from anki.utils import checksum, isLin, isWin, namedtmp, stripHTMLMedia
|
||||||
from aqt import AnkiQt, gui_hooks
|
from aqt import AnkiQt, gui_hooks
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
from aqt.sound import av_player, getAudio
|
from aqt.sound import av_player, getAudio
|
||||||
|
@ -665,7 +665,12 @@ to a cloze type first, via 'Notes>Change Note Type'"""
|
||||||
|
|
||||||
# choose new colour
|
# choose new colour
|
||||||
def onChangeCol(self):
|
def onChangeCol(self):
|
||||||
new = QColorDialog.getColor(QColor(self.fcolour), None)
|
if isLin:
|
||||||
|
new = QColorDialog.getColor(
|
||||||
|
QColor(self.fcolour), None, None, QColorDialog.DontUseNativeDialog
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
new = QColorDialog.getColor(QColor(self.fcolour), None)
|
||||||
# native dialog doesn't refocus us for some reason
|
# native dialog doesn't refocus us for some reason
|
||||||
self.parentWindow.activateWindow()
|
self.parentWindow.activateWindow()
|
||||||
if new.isValid():
|
if new.isValid():
|
||||||
|
|
Loading…
Reference in a new issue