yeahitsjan / pawxel Goto Github PK
View Code? Open in Web Editor NEWLightweight screenshot tool for designers & developers
Home Page: https://pawxel.rocks
License: GNU General Public License v3.0
Lightweight screenshot tool for designers & developers
Home Page: https://pawxel.rocks
License: GNU General Public License v3.0
The screenshot is only restorable "OnClose" of the editor window. The screenshot should be instead saved directly after it has been taken.
Function to call is at https://github.com/yeahitsjan/pawxel/blob/develop/source/application.cpp#L200. This is just connected to the close event of the EditorWindow https://github.com/yeahitsjan/pawxel/blob/develop/source/editor_window.cpp#L386-L387.
Very practical, like in Peek Video Recorder, like in macOS’s screenshot tool…
After running make clean
there are still some .o
files left, is this expected?
$ make clean
rm -f qrc_framelesshelpercore.cpp qrc_resources.cpp
rm -f moc_predefs.h
rm -f moc_application.cpp moc_sniparea.cpp moc_preview_window.cpp moc_editor_view.cpp moc_items.cpp moc_editor_window.cpp moc_preferences.cpp moc_preferences_window.cpp moc_systray.cpp moc_about_window.cpp moc_emoji_widget.cpp moc_chromepalette.cpp moc_framelesshelper_qt.cpp moc_framelesshelpercore_global.cpp moc_framelessmanager.cpp moc_micamaterial.cpp moc_windowborderpainter.cpp moc_chromepalette_p.cpp moc_framelessconfig_p.cpp moc_framelessmanager_p.cpp moc_micamaterial_p.cpp moc_sysapiloader_p.cpp moc_windowborderpainter_p.cpp moc_framelesswidget.cpp moc_framelessmainwindow.cpp moc_standardsystembutton.cpp moc_framelesswidgetshelper.cpp moc_standardtitlebar.cpp moc_framelessdialog.cpp moc_framelesswidgetshelper_p.cpp moc_standardsystembutton_p.cpp moc_standardtitlebar_p.cpp moc_framelesswidget_p.cpp moc_framelessmainwindow_p.cpp moc_widgetssharedhelper_p.cpp moc_framelessdialog_p.cpp moc_phantomstyle.cpp moc_singleapplication.cpp moc_singleapplication_p.cpp moc_qhotkey.cpp moc_qhotkey_p.cpp moc_graphicsitemresizer.cpp moc_FHNotifyWidget.cpp moc_FHMessageBox.cpp
rm -f application.o main.o sniparea.o preview_window.o editor_view.o items.o editor_window.o preferences.o preferences_window.o systray.o about_window.o qt_flowlayout.o emoji_widget.o easylogging++.o chromepalette.o framelessconfig.o framelesshelper_qt.o framelessmanager.o framelesshelpercore_global.o micamaterial.o sysapiloader.o utils.o windowborderpainter.o utils_linux.o framelessmainwindow.o framelesswidgetshelper.o framelesswidget.o standardsystembutton.o standardtitlebar.o widgetssharedhelper.o framelesshelperwidgets_global.o framelessdialog.o phantomcolor.o phantomstyle.o singleapplication.o singleapplication_p.o qhotkey.o qhotkey_x11.o graphicsitemresizer.o handlerstrategies.o resizehandleitem.o FHNotifyWidget.o FHMessageBox.o qrc_framelesshelpercore.o qrc_resources.o moc_application.o moc_sniparea.o moc_preview_window.o moc_editor_view.o moc_items.o moc_editor_window.o moc_preferences.o moc_preferences_window.o moc_systray.o moc_about_window.o moc_emoji_widget.o moc_chromepalette.o moc_framelesshelper_qt.o moc_framelesshelpercore_global.o moc_framelessmanager.o moc_micamaterial.o moc_windowborderpainter.o moc_chromepalette_p.o moc_framelessconfig_p.o moc_framelessmanager_p.o moc_micamaterial_p.o moc_sysapiloader_p.o moc_windowborderpainter_p.o moc_framelesswidget.o moc_framelessmainwindow.o moc_standardsystembutton.o moc_framelesswidgetshelper.o moc_standardtitlebar.o moc_framelessdialog.o moc_framelesswidgetshelper_p.o moc_standardsystembutton_p.o moc_standardtitlebar_p.o moc_framelesswidget_p.o moc_framelessmainwindow_p.o moc_widgetssharedhelper_p.o moc_framelessdialog_p.o moc_singleapplication.o moc_singleapplication_p.o moc_qhotkey.o moc_qhotkey_p.o moc_graphicsitemresizer.o moc_FHNotifyWidget.o moc_FHMessageBox.o
rm -f *~ core *.core
$ ls *.o
moc_select_window.o select_window.o
Shottr has two settings that are quite useful for some workflows.
The current state of the pixel measurement tool ist not satisfying. I would like to reimplement and complete some ideas here. The best idea I had until now is the following (image is not mine, but edited):
The label showing the current distance should be getting a rectangle around it. The user selects two points in the scene after choosing the pixel measurement tool and then a line is drawn onto the scene. We could make this resizable via the resizer-item.
Re-open issue from closed-source repo.
Would also give us the option to implement a user library where own emoji's / vectors can be imported. Needs a major re-implementation, currently based on QGraphicsPixmapItem.
So for me the build fails on Archlinux, do you have any idea why that could be?
g++ -c -pipe -O2 -std=gnu++1z -pthread -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -DELPP_QT_LOGGING -DELPP_STL_LOGGING -DELPP_STRICT_SIZE_CHECK -DELPP_UNICODE -DELPP_MULTI_LOGGER_SUPPORT -DELPP_THREAD_SAFE -DELPP_UNICODE -DELPP_NO_DEFAULT_LOG_FILE -DFRAMELESSHELPER_CORE_STATIC -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6 -DFRAMELESSHELPER_WIDGETS_STATIC -DQAPPLICATION_CLASS=QApplication -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Imodules/easyloggingpp/src -Imodules/framelesshelper/include/FramelessHelper/Core -Imodules/framelesshelper/include/FramelessHelper/Core/private -Imodules/framelesshelper/qmake/inc/core -Imodules/framelesshelper/include/FramelessHelper/Widgets -Imodules/framelesshelper/include/FramelessHelper/Widgets/private -Imodules/phantomstyle/src/phantom -Imodules/SingleApplication -Imodules/QHotkey/QHotkey -Imodules/resizer-item/resizer -Imodules/FHNotifier -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/qt -I/usr/include/qt/QtOpenGL -I/usr/include/qt/QtWidgets/5.15.8 -I/usr/include/qt/QtWidgets/5.15.8/QtWidgets -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui/5.15.8 -I/usr/include/qt/QtGui/5.15.8/QtGui -I/usr/include/qt/QtX11Extras -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore/5.15.8 -I/usr/include/qt/QtCore/5.15.8/QtCore -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o moc_widgetssharedhelper_p.o moc_widgetssharedhelper_p.cpp
In file included from modules/framelesshelper/include/FramelessHelper/Core/framelesshelpercore_global.h:32,
from modules/framelesshelper/include/FramelessHelper/Widgets/framelesshelperwidgets_global.h:27,
from modules/framelesshelper/include/FramelessHelper/Widgets/private/widgetssharedhelper_p.h:27,
from moc_widgetssharedhelper_p.cpp:10:
/usr/include/qt/QtCore/qpointer.h: In instantiation of ‘QPointer<T>::QPointer(T*) [with T = QWidget]’:
modules/framelesshelper/include/FramelessHelper/Widgets/private/widgetssharedhelper_p.h:78:40: required from here
/usr/include/qt/QtCore/qpointer.h:62:29: error: no matching function for call to ‘QWeakPointer<QObject>::QWeakPointer(QWidget*&, bool)’
62 | inline QPointer(T *p) : wp(p, true) { }
| ^~~~~~~~~~~
In file included from /usr/include/qt/QtCore/qsharedpointer.h:48,
from /usr/include/qt/QtCore/qpointer.h:43:
/usr/include/qt/QtCore/qsharedpointer_impl.h:679:12: note: candidate: ‘template<class X, typename std::enable_if<std::is_convertible<_Up*, QObject*>::value, bool>::type <anonymous> > QWeakPointer<T>::QWeakPointer(X*, bool) [with typename std::enable_if<std::is_convertible<_Up*, _Tp*>::value, bool>::type <anonymous> = X; T = QObject]’
679 | inline QWeakPointer(X *ptr, bool) : d(ptr ? Data::getAndRef(ptr) : nullptr), value(ptr)
| ^~~~~~~~~~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:679:12: note: template argument deduction/substitution failed:
/usr/include/qt/QtCore/qsharedpointer_impl.h:678:42: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
678 | template <class X, IfCompatible<X> = true>
| ^~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:636:12: note: candidate: ‘template<class X, typename std::enable_if<std::is_convertible<_Up*, QObject*>::value, bool>::type <anonymous> > QWeakPointer<T>::QWeakPointer(const QSharedPointer<X>&) [with typename std::enable_if<std::is_convertible<_Up*, _Tp*>::value, bool>::type <anonymous> = X; T = QObject]’
636 | inline QWeakPointer(const QSharedPointer<X> &o) : d(nullptr), value(nullptr)
| ^~~~~~~~~~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:636:12: note: template argument deduction/substitution failed:
/usr/include/qt/QtCore/qpointer.h:62:29: note: mismatched types ‘const QSharedPointer<T>’ and ‘QWidget*’
62 | inline QPointer(T *p) : wp(p, true) { }
| ^~~~~~~~~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:615:12: note: candidate: ‘template<class X, typename std::enable_if<std::is_convertible<_Up*, QObject*>::value, bool>::type <anonymous> > QWeakPointer<T>::QWeakPointer(const QWeakPointer<X>&) [with typename std::enable_if<std::is_convertible<_Up*, _Tp*>::value, bool>::type <anonymous> = X; T = QObject]’
615 | inline QWeakPointer(const QWeakPointer<X> &o) : d(nullptr), value(nullptr)
| ^~~~~~~~~~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:615:12: note: template argument deduction/substitution failed:
/usr/include/qt/QtCore/qpointer.h:62:29: note: mismatched types ‘const QWeakPointer<T>’ and ‘QWidget*’
62 | inline QPointer(T *p) : wp(p, true) { }
| ^~~~~~~~~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:606:12: note: candidate: ‘QWeakPointer<T>::QWeakPointer(const QSharedPointer<T>&) [with T = QObject]’
606 | inline QWeakPointer(const QSharedPointer<T> &o) : d(o.d), value(o.data())
| ^~~~~~~~~~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:606:12: note: candidate expects 1 argument, 2 provided
/usr/include/qt/QtCore/qsharedpointer_impl.h:585:5: note: candidate: ‘QWeakPointer<T>::QWeakPointer(QWeakPointer<T>&&) [with T = QObject]’
585 | QWeakPointer(QWeakPointer &&other) noexcept
| ^~~~~~~~~~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:585:5: note: candidate expects 1 argument, 2 provided
/usr/include/qt/QtCore/qsharedpointer_impl.h:583:5: note: candidate: ‘QWeakPointer<T>::QWeakPointer(const QWeakPointer<T>&) [with T = QObject]’
583 | QWeakPointer(const QWeakPointer &other) noexcept : d(other.d), value(other.value)
| ^~~~~~~~~~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:583:5: note: candidate expects 1 argument, 2 provided
/usr/include/qt/QtCore/qsharedpointer_impl.h:565:12: note: candidate: ‘QWeakPointer<T>::QWeakPointer() [with T = QObject]’
565 | inline QWeakPointer() noexcept : d(nullptr), value(nullptr) { }
| ^~~~~~~~~~~~
/usr/include/qt/QtCore/qsharedpointer_impl.h:565:12: note: candidate expects 0 arguments, 2 provided
make: *** [Makefile:2304: moc_widgetssharedhelper_p.o] Error 1
qmake --version
QMake version 3.1
Using Qt version 5.15.8 in /usr/lib
$ uname -a
Linux meterpeter 6.2.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 22 Mar 2023 22:52:35 +0000 x86_64 GNU/Linux
After re-taking a screenshot (using retake button inside the preview window), the following preview window is completely ignoring the applications set theme, defaulting to light. This is probably a creation / deletion related problem which should be relatively easy to fix.
Reference: https://github.com/yeahitsjan/pawxel/blob/develop/source/preview_window.cpp#L121-L124
When ever I add a text to the image and try to change it's color or font the app crashes and I get this error message:
[1] 22325 segmentation fault (core dumped) ./pawxel
I use Linux Mint 21.3 with Cinnamon 6.0.4 running on Xorg
Heyhey, so I just noticed that when one does a fullscreen screenshot
https://mathphys.info/~chris/Screenshots2023-04-21_12:59:28.png
Its sometimes a bit hard to see what is actually which because the preview is rather small. Maybe it would make sense to add indicators like I've sketched it here:
But that is only one solution to the problem, maybe you have a better Idea on how to make it clear which button does what 😊
I only able to take screen shot from main monitor, the cross hair cursor doesn't show up on secondary monitor.
Full screen snip only capture main monitor.
OS: Windows 11 64-bit
Re-open issue from closed-source repo.
Window movement on Linux is currently broken. I still need to test out things, but I assume that this has to do with some part of framelesshelper. Currently window movement is disabled on Linux.
When a large screenshot is taken (for example: combined monitors) and the editor is closed after editing, the window does not disappear directly because writing the temporary file for restoring the last capture takes some time (depending on storage speed). I could trace it down to this point exactly: https://github.com/yeahitsjan/pawxel/blob/develop/source/editor_window.cpp#L387.
A simple but not really good workaround would be to this->hide()
the editor. We could also write the screenshot on main thread after the window has been closed.
When in editor, I would like to crop an image. This can be a Paint-esque crop handle on two corner.
This issue is for tracking / writing down steps to fulfill to upgrade to Qt6. This list will expand regularly, feel free to add your own search results as comments. If changes are implemented for it, these are also added as a corresponding comment.
QPixmap::grabWindow
with QScreen::grabWindow
setMargin
is now setContentsMargin
easylogging++
with loguru
Re-open issue from closed-source repo
An old issue and I don't have any wayland up and running to test. But I assume that there is no way at the moment. Option would be to implement command line arguments and the user can then itself create hotkeys to call the specific functions of Pawxel.
Hi @yeahitsjan
Thanks for building this program. I am a huge fan of Shottr in Mac, and I was quite frustrated not to have a similar alternative for Windows 11.
However, I have an issue that prevents me from using Pawxel correctly. I assume it has to do with the dual monitor bug that is already commented. I have searched withint the issues page, but the link you refer to for follow-up just sends me to the main page for the project (see here: https://github.com/yeahitsjan/pawxel/tree/fix-multi-screen).
The issue for me is that a small are appears, and that's the only part from which I can take a screenshot. Sadly, this comprises just a small part of my two monitors (screenshot attached). I am not sure how to solve this issue.
For reference, this is the hardware I'm using.
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
AMD RX580
W11 Pro
Pawxel 0.13
Main Monitor: 32 inch / 38402160px
Secondary Monitor: 27 inch / 25601440px
Also, not sure if this is the best place to do so, but if you are open to it, can I suggest 2 features that are present in Shottr that might be added to Pawxel?
One would be the option for the editor to open directly (instead of the preview windows), and the other would be for the editor window to close upon calling the copy shorcut.
Thanks for your time!
Re-open issue from closed-source repo
Windows-specific. When changing the display setup from 1 to 2 displays the SnipArea is not drawn over both displays.
On Windows 11, I'd like to use Ctrl+PrntScrn as the shortcut for Snip Screenshot, but when I press the two keys in the settings, nothing happens.
Would it be possible to enable the use of the PrntScrn key in the shortcuts ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.