Skip to content

Commit

Permalink
Hide unfinished stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Iktwo committed Mar 5, 2019
1 parent 76014e9 commit ddd581b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
39 changes: 20 additions & 19 deletions src/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ ApplicationWindow {
Config.Theme.portrait = true
}

function getScreenDensityConfiguration(density) {
switch(density) {
case 420:
return "xxhigh"
case 480:
return "xxhigh"
case 560:
return "xxxhigh"
case 640:
return "xxxhigh"
}
}

color: Config.Theme.colorApplicationWindow

width: resolutions[currentResolution].width
Expand Down Expand Up @@ -90,13 +77,29 @@ ApplicationWindow {
anchors.fill: parent

source: "themes/" + Config.Theme.theme + "/ThemeMain.qml"

Keys.onBackPressed: {
event.accepted = true

if (loaderMainTheme.item && loaderMainTheme.item.opened) {
QL.Launcher.minimize()
}
}

Keys.onEscapePressed: {
if (loaderMainTheme.item && loaderMainTheme.item.opened) {
QL.Launcher.minimize()
}
}

}

Loader {
id: loader

function unload() {
sourceComponent = null
loaderMainTheme.focus = true
}

anchors.fill: parent
Expand All @@ -105,12 +108,9 @@ ApplicationWindow {

focus: true

Keys.onBackPressed: {
event.accepted = true

if (loaderMainTheme.item && loaderMainTheme.item.opened) {
QL.Launcher.minimize()
}
// TODO: Remove this once the intro is ready
Component.onCompleted: {
unload()
}

Component {
Expand All @@ -130,6 +130,7 @@ ApplicationWindow {

onDone: {
QL.ApplicationInfo.hasShownInitialDialog = true
loader.unload()
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/qml/themes/classic/ThemeMain.qml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ FocusScope {

clip: true
interactive: visible
visible: false

cellHeight: height / Config.Theme.getColumns()
cellWidth: width / Config.Theme.getRows()
Expand Down
1 change: 0 additions & 1 deletion src/qml/themes/tiles/ThemeMain.qml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Item {
left: parent.left; leftMargin: (parent.width / 2 ) * 0.025
}

visible: true
model: QL.PackageManager

width: (parent.width / 2 ) * 0.95
Expand Down

0 comments on commit ddd581b

Please sign in to comment.