mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-30 06:13:43 +08:00
ui: screen touch fixes (#84)
* ui: don't toggle map if buttons are hidden * keep button the same height during screen touches * fixed height
This commit is contained in:
@@ -182,7 +182,10 @@ void OnroadWindow::mousePressEvent(QMouseEvent* e) {
|
||||
propagate_event = false;
|
||||
}
|
||||
else if (map != nullptr) {
|
||||
map->setVisible(!sidebarVisible && !map->isVisible());
|
||||
if ((uiState()->scene.sleep_btn != 0 && uiState()->scene.sleep_btn_opacity != 0) ||
|
||||
(uiState()->scene.sleep_time != 0 && uiState()->scene.onroadScreenOff != -2)) {
|
||||
map->setVisible(!sidebarVisible && !map->isVisible());
|
||||
}
|
||||
}
|
||||
// propagation event to parent(HomeWindow)
|
||||
if (propagate_event) {
|
||||
|
||||
@@ -64,8 +64,8 @@ void ScreenRecoder::paintEvent(QPaintEvent *event) {
|
||||
QPainter p(this);
|
||||
p.setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
QPoint center(btn_size / 2 - 25, btn_size / 2 + 10 - uiState()->scene.rn_offset);
|
||||
QRect rec_btn(36 - 25, 36 + 10 - uiState()->scene.rn_offset, 120, 120);
|
||||
QPoint center(btn_size / 2 - 25, btn_size / 2 + 10 - 30);
|
||||
QRect rec_btn(36 - 25, 36 + 10 - 30, 120, 120);
|
||||
|
||||
p.setOpacity(1.0);
|
||||
p.setPen(Qt::NoPen);
|
||||
|
||||
Reference in New Issue
Block a user