diff options
author | Ken Moore <ken@ixsystems.com> | 2019-01-26 09:29:36 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2019-01-26 09:29:36 -0500 |
commit | cbbf4f13808da13c146b371d439eb760453ce6da (patch) | |
tree | 4ea29eee643f1b799c9c849b3e8695325b1e3bf2 /src-qt5 | |
parent | Make the minimum size of the page buttons larger in the lthemeengine UI. (diff) | |
download | lumina-cbbf4f13808da13c146b371d439eb760453ce6da.tar.gz lumina-cbbf4f13808da13c146b371d439eb760453ce6da.tar.bz2 lumina-cbbf4f13808da13c146b371d439eb760453ce6da.zip |
Fix up the minimum size of the shortcut buttons.
Also add statusbar text for copying the image to the clipboard
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp | 10 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-screenshot/MainUI.h | 5 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-screenshot/MainUI.ui | 36 |
3 files changed, 44 insertions, 7 deletions
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp index 97042f9c..88192943 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp @@ -112,6 +112,11 @@ QRect MainUI::pointsToRect(QPoint pt1, QPoint pt2){ return rec; } +void MainUI::showSBMessage(QString msg, int secs){ + //Show statusbar message (for designated time) + ui->statusBar->showMessage("----> "+msg, secs*1000); +} + //============== // PRIVATE SLOTS //============== @@ -154,10 +159,11 @@ void MainUI::quicksave(){ } void MainUI::copyToClipboard(){ - qDebug() << "Copy Image to clipboard"; + //qDebug() << "Copy Image to clipboard"; QClipboard *clipboard = QApplication::clipboard(); clipboard->setImage(IMG->image()); - qDebug() << " - Success:" << !clipboard->image().isNull(); + showSBMessage(tr("Image copied to clipboard"), 10); + //qDebug() << " - Success:" << !clipboard->image().isNull(); } void MainUI::startScreenshot(){ diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.h b/src-qt5/desktop-utils/lumina-screenshot/MainUI.h index cd78dc3c..5ac0eb28 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.h +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.h @@ -61,7 +61,8 @@ private: QRect pointsToRect(QPoint pt1, QPoint pt2); - QShortcut *quitShortcut, *openShortcut; + QShortcut *quitShortcut, *openShortcut; + void showSBMessage(QString msg, int secs); private slots: //Button Slots @@ -85,7 +86,7 @@ private slots: bool getWindow(); //set the "cwin" variable as appropriate void getPixmap(); //set the "cpic" variable to the new screenshot - void quitShortcut_activated(); + void quitShortcut_activated(); protected: void mousePressEvent(QMouseEvent *ev); diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui b/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui index 69045f0c..1593c6cd 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui @@ -83,6 +83,12 @@ <verstretch>0</verstretch> </sizepolicy> </property> + <property name="minimumSize"> + <size> + <width>75</width> + <height>0</height> + </size> + </property> <property name="statusTip"> <string>Open screenshot with an application</string> </property> @@ -99,6 +105,18 @@ </item> <item> <widget class="QToolButton" name="tool_copy_to_clipboard"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>75</width> + <height>0</height> + </size> + </property> <property name="statusTip"> <string>Copy screenshot to clipboard</string> </property> @@ -131,6 +149,12 @@ <verstretch>0</verstretch> </sizepolicy> </property> + <property name="minimumSize"> + <size> + <width>75</width> + <height>0</height> + </size> + </property> <property name="statusTip"> <string>Resize screenshot to selection</string> </property> @@ -153,6 +177,12 @@ <verstretch>0</verstretch> </sizepolicy> </property> + <property name="minimumSize"> + <size> + <width>75</width> + <height>0</height> + </size> + </property> <property name="statusTip"> <string>Crop screenshot to selection</string> </property> @@ -254,8 +284,8 @@ <rect> <x>0</x> <y>0</y> - <width>439</width> - <height>230</height> + <width>64</width> + <height>24</height> </rect> </property> </widget> @@ -496,7 +526,7 @@ <enum>Qt::CustomContextMenu</enum> </property> <property name="windowTitle"> - <string></string> + <string/> </property> <property name="movable"> <bool>false</bool> |