Skip to content

Commit 8a56230

Browse files
v1.10.1
1 parent ae49b6d commit 8a56230

File tree

10 files changed

+220
-69
lines changed

10 files changed

+220
-69
lines changed

data/be.alexandervanhee.gradia.metainfo.xml.in.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@
3737
<color type="primary" scheme_preference="dark">#073c6f</color>
3838
</branding>
3939
<releases>
40+
<release version="1.10.1" date="2025-09-04">
41+
<description translate="no">
42+
<p>This minor release includes:</p>
43+
<ul>
44+
<li>Support for mobile-sized windows.</li>
45+
<li>Redesigned arrow tool shape.</li>
46+
<li>Updated screenshot guide page.</li>
47+
<li>Numerous HIG improvements.</li>
48+
<li>Fixed paste shortcut issue.</li>
49+
<li>Added manual editor for gradient steps.</li>
50+
<li>Updated aspect ratio popover.</li>
51+
</ul>
52+
</description>
53+
</release>
4054
<release version="1.10.0" date="2025-08-21">
4155
<description translate="no">
4256
<p>This feature release includes:</p>

data/ui/image_sidebar.blp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ template $GradiaImageSidebar : Adw.Bin {
148148
[suffix]
149149
Button {
150150
valign: center;
151-
icon-name: "folder-symbolic";
151+
icon-name: "folder-open-symbolic";
152152
action-name: "win.open-folder";
153153
tooltip-text: _("Open Folder");
154154
styles [

data/ui/preferences/screenshot_guide_page.blp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,12 @@ template $GradiaScreenshotGuidePage : Adw.NavigationPage {
110110
Gtk.Separator {
111111
orientation: horizontal;
112112
hexpand: true;
113+
visible: false;
113114
}
114115
Gtk.Box {
115116
orientation: vertical;
116117
spacing: 12;
118+
visible: false;
117119

118120
Gtk.Label {
119121
label: _("Delayed Screenshot");

data/ui/welcome_page.blp

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ template $GradiaWelcomePage : Adw.BreakpointBin {
88
condition ("max-width: 600sp")
99
setters {
1010
recent_picker.compact: true;
11+
button_box.orientation: vertical;
1112
}
1213
}
1314
child: $DropOverlay drop_overlay {
@@ -39,33 +40,32 @@ template $GradiaWelcomePage : Adw.BreakpointBin {
3940
compact: false;
4041
}
4142

42-
Gtk.FlowBox button_box {
43-
row-spacing: 12;
44-
margin-top: 10;
45-
halign: center;
46-
47-
Gtk.Button screenshot_button {
48-
label: _("_Take a Screenshot…");
49-
use-underline: true;
50-
halign: center;
51-
action-name: "win.screenshot";
52-
styles [
53-
"pill",
54-
"text-button",
55-
"suggested-action"
56-
]
57-
}
58-
59-
Gtk.Button open_image_button {
60-
label: _("_Open Image…");
61-
use-underline: true;
62-
halign: center;
63-
action-name: "win.open";
64-
styles [
65-
"pill",
66-
"text-button"
67-
]
68-
}
43+
Gtk.Box button_box {
44+
orientation: horizontal;
45+
spacing: 12;
46+
margin-top: 10;
47+
halign: center;
48+
Gtk.Button screenshot_button {
49+
label: _("Take a Screenshot…");
50+
use-underline: true;
51+
halign: center;
52+
action-name: "win.screenshot";
53+
styles [
54+
"pill",
55+
"text-button",
56+
"suggested-action"
57+
]
58+
}
59+
Gtk.Button open_image_button {
60+
label: _("Open Image…");
61+
use-underline: true;
62+
halign: center;
63+
action-name: "win.open";
64+
styles [
65+
"pill",
66+
"text-button"
67+
]
68+
}
6969
}
7070
};
7171
};

gradia/ui/image_stack.py

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,24 @@ class ImageStack(Adw.Bin):
6666

6767
def __init__(self, **kwargs) -> None:
6868
super().__init__(**kwargs)
69-
self._compact_mode = False
70-
self._width_threshold = 695
69+
self._compact = False
7170
self._setup()
7271

72+
@GObject.Property(type=bool, default=False)
73+
def compact(self) -> bool:
74+
return self._compact
75+
76+
@compact.setter
77+
def compact(self, value: bool) -> None:
78+
if self._compact != value:
79+
self._compact = value
80+
self._update_compact_ui()
81+
82+
def _update_compact_ui(self) -> None:
83+
self.sidebar_button.set_visible(self._compact)
84+
zoom_level = self.zoomable_widget.get_property("zoom-level")
85+
self.zoom_label.set_visible(not self._compact)
86+
7387
def set_erase_selected_visible(self, show: bool) -> None:
7488
self.erase_controls_revealer.set_reveal_child(show)
7589

@@ -96,39 +110,13 @@ def _setup(self) -> None:
96110
drop_target.connect("drop", self._on_file_dropped)
97111
self.drop_overlay.drop_target = drop_target
98112

99-
self._setup_width_monitoring()
100-
101-
def _setup_width_monitoring(self) -> None:
102-
GLib.idle_add(self._setup_window_monitoring)
103-
104-
def _setup_window_monitoring(self) -> bool:
105-
window = self.get_root()
106-
if window:
107-
window.connect("notify::default-width", self._on_window_size_changed)
108-
return False
109-
110-
def _on_window_size_changed(self, window, pspec) -> None:
111-
self._update_compact_mode()
112-
113-
def _update_compact_mode(self) -> None:
114-
window = self.get_root()
115-
if not window:
116-
return
117-
118-
width = window.get_width()
119-
new_compact_mode = width <= self._width_threshold
120-
121-
if new_compact_mode != self._compact_mode:
122-
self._compact_mode = new_compact_mode
123-
self.sidebar_button.set_visible(self._compact_mode)
124-
125-
def is_compact_mode(self) -> bool:
126-
return self._compact_mode
113+
def is_compact(self) -> bool:
114+
return self._compact
127115

128116
def _on_zoom_level_changed(self, widget, pspec) -> None:
129117
zoom_level = widget.get_property("zoom-level")
130118
percentage = int(zoom_level * 100)
131-
self.zoom_label.set_visible(not self._compact_mode)
119+
self.zoom_label.set_visible(not self._compact)
132120
self.zoom_label.set_text(f"{percentage}%")
133121
self.emit("zoom-changed", zoom_level)
134122

@@ -163,7 +151,7 @@ def on_toggle_crop(self) -> None:
163151
self.sidebar_revealer.set_reveal_child(not self.crop_enabled)
164152
self.zoomable_widget.disable_zoom = self.crop_enabled
165153
self.sidebar_button.set_sensitive(not self.crop_enabled)
166-
if not self._compact_mode:
154+
if not self._compact:
167155
self._show_sidebar(not self.crop_enabled)
168156
self.crop_options_revealer.set_reveal_child(self.crop_enabled)
169157

gradia/ui/widget/gradient_step_dialog_button.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ def get_color(self) -> str:
126126
b = int(rgba.blue * 255)
127127
return f"rgb({r},{g},{b})"
128128

129-
def set_step_index(self, index: int):
130-
self.step_index = index
131-
self.set_title(f"Step {index + 1}")
132-
133129
def update_remove_button_sensitivity(self, can_remove: bool):
134130
self.remove_button.set_sensitive(can_remove)
135131

@@ -187,9 +183,6 @@ def _on_step_changed(self, remove_index=None):
187183
self.steps_group.remove(row_to_remove)
188184
self._step_rows.remove(row_to_remove)
189185

190-
for i, row in enumerate(self._step_rows):
191-
row.set_step_index(i)
192-
193186
steps = []
194187
for row in self._step_rows:
195188
position = row.get_position()

gradia/ui/window.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class GradiaMainWindow(Adw.ApplicationWindow):
6363
main_stack: Gtk.Stack = Gtk.Template.Child()
6464
split_view: Gtk.Box = Gtk.Template.Child()
6565

66+
breakpoint: Adw.Breakpoint = Gtk.Template.Child()
67+
6668
def __init__(
6769
self,
6870
temp_dir: str,
@@ -174,6 +176,7 @@ def _setup_image_stack(self) -> None:
174176
self.image_stack = self.image_bin.stack
175177
self.picture = self.image_bin.picture
176178
self.drawing_overlay = self.image_bin.drawing_overlay
179+
self.breakpoint.add_setter(self.image_bin, "compact", True)
177180

178181
def _setup_sidebar(self) -> None:
179182
self.sidebar = ImageSidebar(

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project('gradia', 'c',
2-
version: '1.10.0',
2+
version: '1.10.1',
33
meson_version: '>= 1.0.0',
44
default_options: ['warning_level=2',
55
'werror=false'

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "Gradia"
3-
version = "1.10.0"
3+
version = "1.10.1"
44
requires-python = ">=3.9"
55

66
[tool.pyright]

web/upload-providers/1.10.1.json

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
{
2+
"imgur": {
3+
"name": "Imgur",
4+
"description": "Popular image hosting with easy sharing and robust features.",
5+
"icon_url": "http://gradia.alexandervanhee.be/upload-providers/imgur.webp",
6+
"homepage_url": "https://imgur.com",
7+
"tos_url": "https://imgur.com/tos",
8+
"details": "Imgur is a widely used online image sharing community and image host, known for its simplicity and large user base. It offers convenient image uploading and direct linking.",
9+
"features": [
10+
{
11+
"text": "Free image and GIF hosting",
12+
"type": "positive"
13+
},
14+
{
15+
"text": "Anonymous upload options available",
16+
"type": "positive"
17+
},
18+
{
19+
"text": "Embedding functionality",
20+
"type": "positive"
21+
},
22+
{
23+
"text": "Removal token functionality",
24+
"type": "positive"
25+
},
26+
{
27+
"text": "Subject to API rate limits for frequent uploads",
28+
"type": "negative"
29+
},
30+
{
31+
"text": "Uses Gradia client ID",
32+
"type": "neutral"
33+
}
34+
],
35+
"upload_command": "curl -s -H \"Authorization: Client-ID fc2a3faf090d08b\" -F \"image=@$1\" https://api.imgur.com/3/image | tee >(sed -n 's/.*\"deletehash\":\"\\([^\"]*\\)\".*/\\1/p' | while read h; do echo \"[$(date +%F_%T)] $h\"; done >> \"$XDG_CONFIG_HOME/imgur-delete-hashes.txt\") | sed -n 's/.*\"link\":\"\\([^\"]*\\)\".*/\\1/p' | sed 's/\\\\//g'"
36+
},
37+
"catbox": {
38+
"name": "Catbox",
39+
"description": "Simple and free file hosting with permanent storage.",
40+
"icon_url": "http://gradia.alexandervanhee.be/upload-providers/catbox.webp",
41+
"homepage_url": "https://catbox.moe",
42+
"tos_url": "https://catbox.moe/legal.php",
43+
"details": "Catbox.moe is a straightforward file hosting service designed for simplicity and permanence. It allows users to upload various file types, including images, with no account required.",
44+
"features": [
45+
{
46+
"text": "Completely free file hosting",
47+
"type": "positive"
48+
},
49+
{
50+
"text": "No user account or registration needed",
51+
"type": "positive"
52+
},
53+
{
54+
"text": "Files are kept indefinitely",
55+
"type": "positive"
56+
},
57+
{
58+
"text": "No formal uptime Service Level Agreement (SLA)",
59+
"type": "negative"
60+
},
61+
{
62+
"text": "Limited support for file metadata",
63+
"type": "negative"
64+
}
65+
],
66+
"upload_command": "curl -s -F \"reqtype=fileupload\" -F \"fileToUpload=@$1\" https://catbox.moe/user/api.php"
67+
},
68+
"0x0": {
69+
"name": "0x0.st",
70+
"description": "Open-source file hosting with 30-day availability.",
71+
"icon_url": "http://gradia.alexandervanhee.be/upload-providers/0x0.webp",
72+
"homepage_url": "https://0x0.st",
73+
"tos_url": "https://0x0.st",
74+
"details": "0x0.st is an open-source command-line pastebin and file upload service. It provides temporary hosting for files, typically retaining them for 30 days.",
75+
"features": [
76+
{
77+
"text": "Free and anonymous file hosting",
78+
"type": "positive"
79+
},
80+
{
81+
"text": "No account or registration necessary",
82+
"type": "positive"
83+
},
84+
{
85+
"text": "Transparent and open-source platform",
86+
"type": "positive"
87+
},
88+
{
89+
"text": "Files are available for 30 days by default",
90+
"type": "neutral"
91+
},
92+
{
93+
"text": "No official service guarantees",
94+
"type": "negative"
95+
},
96+
{
97+
"text": "No way to remove uploaded images",
98+
"type": "negative"
99+
},
100+
{
101+
"text": "Sole proprietorship",
102+
"type": "negative"
103+
},
104+
{
105+
"text": "Access may be restricted in some geographical regions",
106+
"type": "negative"
107+
}
108+
],
109+
"upload_command": "curl -s -A \"Gradia (+https://gradia.alexandervanhee.be)\" -F \"file=@$1\" https://0x0.st | tr -d '\\n'"
110+
},
111+
"gofile": {
112+
"name": "GoFile.io",
113+
"description": "Free and robust file sharing platform for large files.",
114+
"icon_url": "http://gradia.alexandervanhee.be/upload-providers/gofile.webp",
115+
"homepage_url": "https://gofile.io",
116+
"tos_url": "https://gofile.io/terms",
117+
"details": "GoFile.io is a versatile file sharing service that allows users to upload and share files of various sizes. It's known for its ease of use and support for large uploads without requiring an account.",
118+
"features": [
119+
{
120+
"text": "Free and easy-to-use file hosting",
121+
"type": "positive"
122+
},
123+
{
124+
"text": "No registration or account required",
125+
"type": "positive"
126+
},
127+
{
128+
"text": "Supports very large file uploads",
129+
"type": "positive"
130+
},
131+
{
132+
"text": "Provides direct download links",
133+
"type": "positive"
134+
},
135+
{
136+
"text": "Files are hosted temporarily and may expire",
137+
"type": "negative"
138+
},
139+
{
140+
"text": "API usage is subject to rate limits",
141+
"type": "negative"
142+
},
143+
{
144+
"text": "Access may be restricted in some geographical regions",
145+
"type": "negative"
146+
}
147+
],
148+
"upload_command": "curl -s -F \"file=@$1\" https://store1.gofile.io/uploadFile | sed -n 's/.*\"downloadPage\":\"\\([^\"]*\\)\".*/\\1/p'"
149+
}
150+
}
151+

0 commit comments

Comments
 (0)