Skip to content

Commit 907be42

Browse files
make selection box color the adwaita accent color
1 parent 83f1fbf commit 907be42

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,13 @@ If you'd like Gradia to **open automatically** after taking a screenshot, you ca
4949
<img src="screenshots/showcase.webp" alt="Showcase screenshot" style="width:45%; margin-right: 5%;">
5050
<img src="screenshots/home.webp" alt="Home screenshot" style="width:45%;">
5151
</p>
52+
53+
54+
## How to build
55+
56+
### GNOME Builder
57+
58+
1. Install Builder from [Flathub](https://flathub.org/apps/org.gnome.Builder).
59+
2. Click the **Clone Repository** button at the bottom right and enter the repository URL.
60+
3. Once cloned, locate the dropdown menu next to the `be.alexandervanhee.gradia.json` text at the top of the screen.
61+
4. Use the dropdown to press **Build** to compile the project. From the same menu, you can also **Run** the project or **Export** it as a Flatpak bundle.

gradia/ui/drawing_overlay.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
#
1616
# SPDX-License-Identifier: GPL-3.0-or-later
1717

18-
from gi.repository import Gtk, Gdk, Gio, cairo, Pango, PangoCairo
18+
from gi.repository import Gtk, Gdk, Gio, cairo, Pango, PangoCairo, Adw
1919
from enum import Enum
2020
from gradia.ui.drawing_actions import *
2121
import math
2222
import re
2323

24-
SELECTION_BOX_COLOR = (0.5, 0.5, 1.0, 0.8)
2524
SELECTION_BOX_PADDING = 0
2625
DEFAULT_PEN_SIZE = 3.0
2726
DEFAULT_ARROW_HEAD_SIZE = 25.0
@@ -161,7 +160,8 @@ def _draw_selection_box(self, cr, scale):
161160
x2 += SELECTION_BOX_PADDING
162161
y2 += SELECTION_BOX_PADDING
163162

164-
cr.set_source_rgba(*SELECTION_BOX_COLOR)
163+
accent = Adw.StyleManager.get_default().get_accent_color_rgba()
164+
cr.set_source_rgba(accent.red, accent.green, accent.blue, accent.alpha)
165165
cr.set_line_width(1.0)
166166
cr.set_dash([5.0, 5.0])
167167
cr.rectangle(x1, y1, x2 - x1, y2 - y1)

0 commit comments

Comments
 (0)