Make single screen overlays better
This commit is contained in:
parent
ad1734927b
commit
c19221cd37
@ -34,7 +34,11 @@ ColorPickerScene::ColorPickerScene(QPixmap pixmap, QWidget *parentWidget)
|
||||
ellipse->setBrush(color);
|
||||
image = pixmap.toImage();
|
||||
|
||||
show();
|
||||
if (QApplication::screens().size() == 1)
|
||||
showFullScreen();
|
||||
else
|
||||
show();
|
||||
|
||||
activateWindow();
|
||||
setGeometry(pixmap.rect());
|
||||
QPoint p = screenshotutil::smallestScreenCoordinate()
|
||||
|
@ -13,7 +13,10 @@
|
||||
CropEditor::CropEditor(QPixmap image, QObject *parent) : QObject(parent) {
|
||||
scene = new CropScene(parent, image);
|
||||
view = new CropView(scene);
|
||||
view->show();
|
||||
if (QApplication::screens().size() > 1)
|
||||
view->show();
|
||||
else
|
||||
view->showFullScreen();
|
||||
view->raise();
|
||||
QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem(image);
|
||||
pixmapItem->setZValue(-1);
|
||||
|
@ -200,9 +200,9 @@ void CropScene::show() {
|
||||
|
||||
void CropScene::setVisible(bool visible) {
|
||||
for (auto view : views()) {
|
||||
if (view->isVisible()) fullscreen |= view->isFullScreen();
|
||||
view->setVisible(visible);
|
||||
if (visible) {
|
||||
if (QApplication::screens().size() == 1) view->showFullScreen();
|
||||
view->resize(_pixmap.width(), _pixmap.height());
|
||||
view->setMinimumSize(_pixmap.size());
|
||||
QPoint p = screenshotutil::smallestScreenCoordinate() + QPoint(settings::settings().value("cropx", 0).toInt(),
|
||||
|
@ -61,7 +61,6 @@ private:
|
||||
void updateMag();
|
||||
void initMagnifierGrid();
|
||||
void addDrawingAction(QMenuBar *menu, QString name, QString icon, std::function<DrawItem *()> item);
|
||||
bool fullscreen;
|
||||
QPointF cursorPos;
|
||||
std::function<DrawItem *()> drawingSelectionMaker;
|
||||
QFlags<Qt::MouseButton> prevButtons;
|
||||
|
Loading…
Reference in New Issue
Block a user