LanguageSidebar: simplify code

This commit is contained in:
selsta 2021-04-14 19:16:25 +02:00
parent 8444a9563e
commit c60252d3ce
2 changed files with 1 additions and 12 deletions

View file

@ -37,17 +37,6 @@ import QtQuick.Controls 2.0
Drawer { Drawer {
id: sideBar id: sideBar
// @TODO: Qt 5.10 introduces `opened` built-in for Drawer
property bool isOpened: false
onClosed: {
isOpened = false;
}
onOpened: {
isOpened = true;
}
width: 240 width: 240
height: parent.height - (persistentSettings.customDecorations ? 50 : 0) height: parent.height - (persistentSettings.customDecorations ? 50 : 0)
y: titleBar.height y: titleBar.height

View file

@ -1948,7 +1948,7 @@ ApplicationWindow {
} }
function toggleLanguageView(){ function toggleLanguageView(){
languageSidebar.isOpened ? languageSidebar.close() : languageSidebar.open(); languageSidebar.visible ? languageSidebar.close() : languageSidebar.open();
resetLanguageFields() resetLanguageFields()
} }