From 58a7d8c9cf50d4b2a9ae321684ca9d4ce4504260 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Fri, 10 May 2024 00:04:04 -0400 Subject: Disable automatic hidpi scaling on maps. Add zoom option. --- mapman/src/groupview.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mapman/src/groupview.cpp') diff --git a/mapman/src/groupview.cpp b/mapman/src/groupview.cpp index 136607b..ea4225a 100644 --- a/mapman/src/groupview.cpp +++ b/mapman/src/groupview.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -79,7 +80,7 @@ group_view::group_view() : QMdiSubWindow() auto rightpane = new QWidget(); auto l3 = new QVBoxLayout(); rightpane->setLayout(l3); - p = new map_painter(); + p = new map_painter(this); l3->addWidget(p->view()); connect(p, &map_painter::map_id_changed, this, &group_view::painter_drop); tetitle = new QLineEdit(); @@ -103,6 +104,13 @@ group_view::group_view() : QMdiSubWindow() l4->addWidget(new QLabel("x")); l4->addWidget(sbv); l4->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding)); + l4->addWidget(new QLabel("Zoom")); + cbscale = new QComboBox(); + cbscale->addItems({QStringLiteral("100%"), QStringLiteral("200%"), QStringLiteral("300%"), QStringLiteral("400%")}); + connect(cbscale, &QComboBox::currentIndexChanged, this, [this](int idx) { + p->set_scaling(idx + 1); + }); + l4->addWidget(cbscale); pbapply = new QPushButton("Save"); connect(pbapply, &QPushButton::pressed, this, &group_view::update_library); -- cgit v1.2.3