From 8cbe8e0c8864b650d8fb4d9a3fc455f255d783f6 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Sat, 27 May 2017 13:08:09 +0200 Subject: [PATCH] Add comments and minor changes --- README.md | 3 +++ docs/futureFeatures.md | 2 ++ src/capture/button.cpp | 3 ++- src/capture/capturewidget.cpp | 2 +- src/config/uicoloreditor.cpp | 4 ++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4a99d22a..c46c61ad 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,9 @@ Check out the information window to see all the available shortcuts in the captu This software is very focused on selection capture and edition, but you can do full screen captures very easily just not having a visible selection, by default it will take it as if you were selecting the whole screen. ## Considerations + +**Not working on Wayland** + If you have a system-wide shortcut assigned to the`Print` key, you should disable it because it may interfere with the global key detection. diff --git a/docs/futureFeatures.md b/docs/futureFeatures.md index 78c672c6..b15c4def 100644 --- a/docs/futureFeatures.md +++ b/docs/futureFeatures.md @@ -8,3 +8,5 @@ These are just conceptual and they may not be implemented implemented in a short - CLI tool: having a cli tool is very practical and it could be used in many different ways. Having a command line program will enable the posibility of using the system-wide shortcuts to activate the captures. - Video Recording Support: I don't know if this will happen but it could be interesting to have a unified tool and satisfy every need to capture your desktop. Requires a ton of investigation. + +- Wayland support diff --git a/src/capture/button.cpp b/src/capture/button.cpp index 14a5b627..4d3695b0 100644 --- a/src/capture/button.cpp +++ b/src/capture/button.cpp @@ -221,7 +221,8 @@ void Button::updateIconColor(const QColor &c) { void Button::updateIconColor() { setIcon(getIcon(m_buttonType, iconIsWhite())); } - +// iconIsWhite returns true if the passed color would contain a white icon +// if applied to a button, and false otherwise bool Button::iconIsWhite(const QColor &c) { bool isWhite = false; if (c.value() < m_colorValueLimit || diff --git a/src/capture/capturewidget.cpp b/src/capture/capturewidget.cpp index 14a06dca..eea7c453 100644 --- a/src/capture/capturewidget.cpp +++ b/src/capture/capturewidget.cpp @@ -150,7 +150,7 @@ void CaptureWidget::paintEvent(QPaintEvent *) { // paint handlers updateHandles(); painter.setBrush(m_uiColor); - for(auto r: handleMask()) { + for(auto r: handleMask().rects()) { painter.drawRoundRect(r, 100, 100); } } diff --git a/src/config/uicoloreditor.cpp b/src/config/uicoloreditor.cpp index 0aae7a18..0e7ce88b 100644 --- a/src/config/uicoloreditor.cpp +++ b/src/config/uicoloreditor.cpp @@ -37,7 +37,7 @@ UIcolorEditor::UIcolorEditor(QWidget *parent) : QFrame(parent) { setLayout(hLayout); } - +// updateUIcolor updates the appearance of the buttons void UIcolorEditor::updateUIcolor() { QSettings settings; if (m_lastButtonPressed == m_buttonMainColor) { @@ -46,7 +46,7 @@ void UIcolorEditor::updateUIcolor() { settings.setValue("contastUiColor", m_uiColor); } } - +// updateLocalColor updates the local button void UIcolorEditor::updateLocalColor(const QColor c) { m_uiColor = c; QString style = Button::getStyle(c);