mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Set application stylesheet (.css)
Sets the style for LineEdit boxes similarly to the specified design in issue #117.
This commit is contained in:
parent
e64954acfa
commit
0e36f8d2eb
2 changed files with 10 additions and 1 deletions
|
@ -13,6 +13,7 @@ from PySide2 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from .. import args, errors
|
from .. import args, errors
|
||||||
from ..document import Document
|
from ..document import Document
|
||||||
|
from ..util import get_resource_path
|
||||||
from .logic import DangerzoneGui
|
from .logic import DangerzoneGui
|
||||||
from .main_window import MainWindow
|
from .main_window import MainWindow
|
||||||
from .systray import SysTray
|
from .systray import SysTray
|
||||||
|
@ -29,7 +30,9 @@ class ApplicationWrapper(QtCore.QObject):
|
||||||
super(ApplicationWrapper, self).__init__()
|
super(ApplicationWrapper, self).__init__()
|
||||||
self.app = QtWidgets.QApplication()
|
self.app = QtWidgets.QApplication()
|
||||||
self.app.setQuitOnLastWindowClosed(False)
|
self.app.setQuitOnLastWindowClosed(False)
|
||||||
|
with open(get_resource_path("dangerzone.css"), "r") as f:
|
||||||
|
style = f.read()
|
||||||
|
self.app.setStyleSheet(style)
|
||||||
self.original_event = self.app.event
|
self.original_event = self.app.event
|
||||||
|
|
||||||
def monkeypatch_event(arg__1: QtCore.QEvent) -> bool:
|
def monkeypatch_event(arg__1: QtCore.QEvent) -> bool:
|
||||||
|
|
6
share/dangerzone.css
Normal file
6
share/dangerzone.css
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
QLineEdit {
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #c8c8c8 #c8c8c8 white;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
Loading…
Reference in a new issue