Add theme property to Utils
Gets set to the window.theme when a theme is loaded, done to avoid having to refer to the window object from utils.
This commit is contained in:
parent
a389238024
commit
cc7c0ad336
|
@ -67,6 +67,7 @@ Python {
|
||||||
window.uiState = uiState
|
window.uiState = uiState
|
||||||
window.history = history
|
window.history = history
|
||||||
window.theme = Qt.createQmlObject(theme, window, "theme")
|
window.theme = Qt.createQmlObject(theme, window, "theme")
|
||||||
|
utils.theme = window.theme
|
||||||
|
|
||||||
if (callback) { callback(settings, uiState, theme) }
|
if (callback) { callback(settings, uiState, theme) }
|
||||||
})
|
})
|
||||||
|
|
|
@ -6,6 +6,8 @@ import CppUtils 0.1
|
||||||
QtObject {
|
QtObject {
|
||||||
enum Media { Page, File, Image, Video, Audio }
|
enum Media { Page, File, Image, Video, Audio }
|
||||||
|
|
||||||
|
property QtObject theme: null
|
||||||
|
|
||||||
readonly property var imageExtensions: [
|
readonly property var imageExtensions: [
|
||||||
"bmp", "gif", "jpg", "jpeg", "png", "pbm", "pgm", "ppm", "xbm", "xpm",
|
"bmp", "gif", "jpg", "jpeg", "png", "pbm", "pgm", "ppm", "xbm", "xpm",
|
||||||
"tiff", "webp", "svg",
|
"tiff", "webp", "svg",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user