Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Only use themable colors for the SAP

Luna Lovecraft12dd30553329
diff --git a/krita/pics/misc-light/light_drag-handle.svg b/krita/pics/misc-light/light_drag-handle.svg
index f20eb6d855..15a35aff0f 100644
--- a/krita/pics/misc-light/light_drag-handle.svg
+++ b/krita/pics/misc-light/light_drag-handle.svg
@@ -28,17 +28,17 @@
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
- inkscape:zoom="30.72379"
- inkscape:cx="11.61966"
- inkscape:cy="12.937857"
+ inkscape:zoom="15.361895"
+ inkscape:cx="3.7104797"
+ inkscape:cy="15.850909"
inkscape:document-units="px"
inkscape:current-layer="g4152"
showgrid="true"
units="px"
inkscape:showpageshadow="false"
showborder="true"
- inkscape:window-width="1078"
- inkscape:window-height="1056"
+ inkscape:window-width="1920"
+ inkscape:window-height="1080"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
@@ -111,25 +111,25 @@
inkscape:groupmode="layer"
transform="translate(0 -10)">
<circle
- style="opacity:1;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="opacity:1;fill:#d2d2d2;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path823"
cx="8"
cy="18.5"
r="1.5" />
<circle
- style="display:inline;opacity:1;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="display:inline;opacity:1;fill:#d2d2d2;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path823-1-8"
cx="13.5"
cy="18.5"
r="1.5" />
<circle
- style="display:inline;opacity:1;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="display:inline;opacity:1;fill:#d2d2d2;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path823-7-0"
cx="8"
cy="23.5"
r="1.5" />
<circle
- style="display:inline;opacity:1;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="display:inline;opacity:1;fill:#d2d2d2;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path823-1-8-2-3"
cx="13.5"
cy="23.5"
diff --git a/libs/ui/kis_selection_actions_panel.cpp b/libs/ui/kis_selection_actions_panel.cpp
index e7149ea3da..3e9169458f 100644
--- a/libs/ui/kis_selection_actions_panel.cpp
+++ b/libs/ui/kis_selection_actions_panel.cpp
@@ -12,6 +12,7 @@
#include "kis_canvas2.h"
#include "kis_canvas_resource_provider.h"
#include "kis_icon_utils.h"
+#include "kis_painting_tweaks.h"
#include "kis_selection.h"
#include "kis_selection_actions_panel_button.h"
#include "kis_selection_actions_panel_handle.h"
@@ -293,8 +294,17 @@ QPoint KisSelectionActionsPanel::initialDragHandlePosition() const
void KisSelectionActionsPanel::drawActionBarBackground(QPainter &painter) const
{
const int cornerRadius = 4;
- QColor outlineColor = Qt::darkGray;
- const QColor bgColor = qApp->palette().window().color();
+ QColor outlineColor = qApp->palette().window().color();
+
+ QColor bgColor = qApp->palette().window().color();
+
+ //Slightly lighten the color, to force `dragColor` to move it in the lighter direction, without this it will always darken the color
+ if (!KisIconUtils::useDarkIcons()) {
+ bgColor = bgColor.lighter(120);
+ }
+
+ KisPaintingTweaks::dragColor(&bgColor, outlineColor, 0.25);
+
QColor bgColorTrans = bgColor;
bgColorTrans.setAlpha(80);
const int outline_width = 4;
diff --git a/libs/ui/kis_selection_actions_panel_handle.cpp b/libs/ui/kis_selection_actions_panel_handle.cpp
index 0077e838fe..efa457aecd 100644
--- a/libs/ui/kis_selection_actions_panel_handle.cpp
+++ b/libs/ui/kis_selection_actions_panel_handle.cpp
@@ -6,6 +6,7 @@
#include "kis_selection_actions_panel_handle.h"
#include "kis_icon_utils.h"
+#include <qapplication.h>
struct KisSelectionActionsPanelHandle::Private
{
@@ -47,8 +48,10 @@ void KisSelectionActionsPanelHandle::set_held(bool held)
void KisSelectionActionsPanelHandle::draw(QPainter& painter)
{
QRect rect = geometry();
+
// Adjust the rect a bit to fill the right side of the bar properly
- painter.fillRect(rect.marginsAdded(QMargins(-3, 4, 1, 4)), Qt::darkGray);
+ painter.fillRect(rect.marginsAdded(QMargins(-3, 4, 1, 4)), qApp->palette().window().color());
+
// Adjusting the icon location a bit to be properly centered
d->handle_icon.paint(&painter, QRect(rect.x() + 3, rect.y(), d->size, d->size));
}