Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LMS
FishUI
Commits
cde3d19d
Commit
cde3d19d
authored
Jun 18, 2020
by
Andy Regensky
Browse files
Improve packaging and modularity
parent
bffc89f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
fishui/FishUI.py
0 → 100644
View file @
cde3d19d
from
PySide2.QtCore
import
Qt
from
PySide2.QtGui
import
QPalette
,
QColor
from
PySide2.QtWidgets
import
QApplication
from
fishui.MainWindow
import
MainWindow
def
run
():
return
FishUI
().
run
()
class
FishUI
:
def
__init__
(
self
):
# Create application
self
.
app
=
QApplication
()
# Set dark style
self
.
app
.
setStyle
(
"Fusion"
)
palette
=
QPalette
()
palette
.
setColor
(
QPalette
.
Window
,
QColor
(
53
,
53
,
53
))
palette
.
setColor
(
QPalette
.
WindowText
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
Base
,
QColor
(
25
,
25
,
25
))
palette
.
setColor
(
QPalette
.
AlternateBase
,
QColor
(
53
,
53
,
53
))
palette
.
setColor
(
QPalette
.
ToolTipBase
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
ToolTipText
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
Text
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
Button
,
QColor
(
53
,
53
,
53
))
palette
.
setColor
(
QPalette
.
ButtonText
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
BrightText
,
Qt
.
red
)
palette
.
setColor
(
QPalette
.
Link
,
QColor
(
42
,
130
,
218
))
palette
.
setColor
(
QPalette
.
Highlight
,
QColor
(
42
,
130
,
218
))
palette
.
setColor
(
QPalette
.
HighlightedText
,
Qt
.
black
)
self
.
app
.
setPalette
(
palette
)
# Create main window
self
.
mainWindow
=
MainWindow
()
def
run
(
self
):
self
.
mainWindow
.
show
()
return
self
.
app
.
exec_
()
fishui/__init__.py
View file @
cde3d19d
from
.FishUI
import
FishUI
,
run
__all__
=
[
'FishUI'
,
'run'
]
main.py
View file @
cde3d19d
import
sys
from
PySide2.QtCore
import
Qt
from
PySide2.QtGui
import
QPalette
,
QColor
from
PySide2.QtWidgets
import
QApplication
from
fishui.MainWindow
import
MainWindow
import
fishui
if
__name__
==
'__main__'
:
# Create the application
app
=
QApplication
()
# Set dark style
app
.
setStyle
(
"Fusion"
)
palette
=
QPalette
()
palette
.
setColor
(
QPalette
.
Window
,
QColor
(
53
,
53
,
53
))
palette
.
setColor
(
QPalette
.
WindowText
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
Base
,
QColor
(
25
,
25
,
25
))
palette
.
setColor
(
QPalette
.
AlternateBase
,
QColor
(
53
,
53
,
53
))
palette
.
setColor
(
QPalette
.
ToolTipBase
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
ToolTipText
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
Text
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
Button
,
QColor
(
53
,
53
,
53
))
palette
.
setColor
(
QPalette
.
ButtonText
,
Qt
.
white
)
palette
.
setColor
(
QPalette
.
BrightText
,
Qt
.
red
)
palette
.
setColor
(
QPalette
.
Link
,
QColor
(
42
,
130
,
218
))
palette
.
setColor
(
QPalette
.
Highlight
,
QColor
(
42
,
130
,
218
))
palette
.
setColor
(
QPalette
.
HighlightedText
,
Qt
.
black
)
app
.
setPalette
(
palette
)
# Create the main window
mainWindow
=
MainWindow
()
mainWindow
.
show
()
# Run the main event loop
sys
.
exit
(
app
.
exec_
())
sys
.
exit
(
fishui
.
run
())
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment