Formatting

This commit is contained in:
Jonas Kvinge
2021-06-22 14:04:32 +02:00
parent 83a70fecca
commit b071ecb45e
5 changed files with 13 additions and 10 deletions

View File

@@ -146,8 +146,8 @@ class FancyTabBar: public QTabBar { // clazy:exclude=missing-qobject-macro
int w = std::max(tabWidget->iconsize_smallsidebar(), rect.height()) + 15;
int h = tabWidget->iconsize_smallsidebar() + rect.width() + 20;
size = QSize(w, h);
}
else {
}
else {
size = QTabBar::tabSizeHint(index);
}

View File

@@ -61,19 +61,23 @@ void TrackSliderSlider::mousePressEvent(QMouseEvent *e) {
Qt::MouseButton new_button = e->button();
if (e->button() == Qt::LeftButton) {
int abs_buttons = style()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons);
if (abs_buttons & Qt::LeftButton)
if (abs_buttons & Qt::LeftButton) {
new_button = Qt::LeftButton;
else if (abs_buttons & Qt::MiddleButton)
}
else if (abs_buttons & Qt::MiddleButton) {
new_button = Qt::MiddleButton;
else if (abs_buttons & Qt::RightButton)
}
else if (abs_buttons & Qt::RightButton) {
new_button = Qt::RightButton;
}
}
QMouseEvent new_event(e->type(), e->pos(), new_button, new_button, e->modifiers());
QSlider::mousePressEvent(&new_event);
if (new_event.isAccepted())
if (new_event.isAccepted()) {
e->accept();
}
}