Merge pull request #3394

c60252d LanguageSidebar: simplify code (selsta)
This commit is contained in:
luigi1111 2021-04-16 12:55:08 -05:00
commit 7dcd33f203
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
2 changed files with 1 additions and 12 deletions

View file

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

View file

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