dpi-dependent methods

This commit is contained in:
2021-06-14 15:45:29 +03:00
parent b09390a460
commit 8646132928
10 changed files with 18 additions and 18 deletions

View File

@@ -91,7 +91,7 @@ void BlockView::_init() {
sel_rect.hide();
QColor sc = palette().color(QPalette::Highlight);
sc.setAlphaF(0.6);
QPen pen(sc.darker(200), lineThickness() + 1., Qt::DotLine);
QPen pen(sc.darker(200), lineThickness(this) + 1., Qt::DotLine);
pen.setCosmetic(true);
sel_rect.setPen(pen);
sc.setAlphaF(0.2);
@@ -791,7 +791,7 @@ void BlockView::keyReleaseEvent(QKeyEvent * e) {
void BlockView::resizeEvent(QResizeEvent * event) {
QGraphicsView::resizeEvent(event);
thick = lineThickness();
thick = lineThickness(this);
adjustThumb();
updateNavRect();
nav_target = _nav();

View File

@@ -235,8 +235,8 @@ actions_Z_up(this), actions_Z_top(this), actions_Z_down(this), actions_Z_bottom(
ui->labelBrush->setMinimumSize(ui->labelPen->minimumSize());
ui->labelBrush->setMaximumSize(ui->labelBrush->minimumSize());
widget_props->setEnabled(false);
int fh = qMax<int>(fontHeight(), 22);
int thick = lineThickness();
int fh = qMax<int>(fontHeight(this), 22);
int thick = lineThickness(this);
QSize sz(fh * 2.5, fh);
ui->comboLineStyle->setIconSize(sz);
for (int i = 0; i < 6; i++) {