Skip to content

Commit

Permalink
unlocker: fix for new key widget draw
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzz committed May 14, 2022
1 parent 5425e70 commit 2bb2df1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/python/unlocker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-or-later

from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtWidgets import QVBoxLayout, QLabel, QProgressBar, QDialog
from PyQt5.QtGui import QPalette
from PyQt5.QtWidgets import QVBoxLayout, QLabel, QProgressBar, QDialog, QApplication

from widgets.keyboard_widget import KeyboardWidget
from util import tr
Expand All @@ -12,6 +13,9 @@ class Unlocker(QDialog):
def __init__(self, layout_editor, keyboard):
super().__init__()

self.setStyleSheet("background-color: {}".format(
QApplication.palette().color(QPalette.Button).lighter(130).name()))

self.keyboard = keyboard

layout = QVBoxLayout()
Expand Down Expand Up @@ -50,7 +54,7 @@ def update_reference(self):
lock_keys = self.keyboard.get_unlock_keys()
for w in self.keyboard_reference.widgets:
if (w.desc.row, w.desc.col) in lock_keys:
w.setActive(True)
w.setOn(True)

self.keyboard_reference.update_layout()
self.keyboard_reference.update()
Expand Down

0 comments on commit 2bb2df1

Please sign in to comment.