Skip to content

Commit d54096e

Browse files
authored
Force PNG clipboard on Windows (flameshot-org#4413)
1 parent 1e29613 commit d54096e

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

flameshot.example.ini

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
;saveAsFileExtension=.png
2020
;
2121
;; UI language (auto = detected system language)
22-
; uiLanguage=auto
22+
;uiLanguage=auto
2323
;
2424
;; Main UI color
2525
;; Color is any valid hex code or W3C color name
@@ -54,16 +54,17 @@
5454
;; Whether the tray icon is disabled (bool)
5555
;disabledTrayIcon=false
5656
;
57-
;; Use grim-based wayland universal screenshot adapter
57+
;; Use grim-based wayland universal screenshot adapter (bool)
5858
;useGrimAdapter=false
5959
;
60-
;; Disable Grim Warning notification
60+
;; Disable Grim Warning notification (bool)
6161
;disabledGrimWarning=true
6262
;
63-
;; Automatically close daemon when it's not needed (not available on Windows)
63+
;; Automatically close daemon when it's not needed (bool)
64+
;; (This option is not available on Windows)
6465
;autoCloseIdleDaemon=false
6566
;
66-
;; Allow multiple instances of `flameshot gui` to run at the same time
67+
;; Allow multiple instances of `flameshot gui` to run at the same time (bool)
6768
;allowMultipleGuiInstances=false
6869
;
6970
;; Last used tool thickness; same thickness shared by Pencil, Line, Arrow, Rectangular Selection, Circle (int)
@@ -102,23 +103,24 @@
102103
;; Copy path to image after save (bool)
103104
;copyPathAfterSave=false
104105
;
105-
;; On successful upload, close the dialog and copy URL to clipboard.
106+
;; On successful upload, close the dialog and copy URL to clipboard (bool)
106107
;copyAndCloseAfterUpload=true
107108
;
108109
;; Anti-aliasing image when zoom the pinned image (bool)
109110
;antialiasingPinZoom=true
110111
;
111112
;; Use JPG format instead of PNG (bool)
113+
;; (This option is not available on Windows)
112114
;useJpgForClipboard=false
113115
;
114116
;; Upload to imgur without confirmation (bool)
115117
;uploadWithoutConfirmation=false
116118
;
117-
;; Use larger color palette as the default one
118-
; predefinedColorPaletteLarge=false
119+
;; Use larger color palette as the default one (bool)
120+
;predefinedColorPaletteLarge=false
119121
;
120122
;; Set JPEG Quality (int in range 0-100)
121-
; jpegQuality=75
123+
;jpegQuality=75
122124
;
123125
;; Shortcut Settings for all tools
124126
;[Shortcuts]

src/config/generalconf.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,14 +688,20 @@ void GeneralConf::initUseJpgForClipboard()
688688
{
689689
m_useJpgForClipboard =
690690
new QCheckBox(tr("Use JPG format for clipboard (PNG default)"), this);
691+
692+
#ifdef Q_OS_WIN
693+
ConfigHandler().setUseJpgForClipboard(false);
694+
m_useJpgForClipboard->setVisible(false);
695+
#else
691696
m_useJpgForClipboard->setToolTip(
692697
tr("Use lossy JPG format for clipboard (lossless PNG default)"));
693-
m_scrollAreaLayout->addWidget(m_useJpgForClipboard);
694-
695698
connect(m_useJpgForClipboard,
696699
&QCheckBox::clicked,
697700
this,
698701
&GeneralConf::useJpgForClipboardChanged);
702+
#endif
703+
704+
m_scrollAreaLayout->addWidget(m_useJpgForClipboard);
699705
}
700706

701707
void GeneralConf::saveAfterCopyChanged(bool checked)

0 commit comments

Comments
 (0)