Skip to content

Commit 9e43395

Browse files
GSoC'25 Week 09 Update by Krish (#360)
* GSoC'25 Week 09 Update by Krish * Fix typos and formatting in GSoC '25 Week 9 update * webp updated
1 parent 4561a8b commit 9e43395

File tree

2 files changed

+98
-6
lines changed

2 files changed

+98
-6
lines changed

src/constants/MarkdownFiles/posts/2025-07-26-gsoc-25-mostlyk-week08.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ category: "DEVELOPER NEWS"
55
date: "2025-07-26"
66
slug: "2025-07-26-gsoc-25-mostlyk-week08"
77
author: "@/constants/MarkdownFiles/authors/krish-pandya.md"
8-
tags: "gsoc25,sugarlabs,week06,mostlyk"
8+
tags: "gsoc25,sugarlabs,week08,mostlyk"
99
image: "assets/Images/GSOC.webp"
1010
---
1111

@@ -18,15 +18,15 @@ image: "assets/Images/GSOC.webp"
1818

1919
---
2020

21-
## In Summary:
21+
## In Summary
2222

2323
Focused on palette positioning, finished graphics for widgets.py and prepared for activity porting.
2424

2525
> ## The Palette Rewrite of '25
26+
>
2627
> The palette system was one of the most challenging and complex rewrites till now, it wasn't a find and replace, original implementation was tied to our own gestures. And event model and widget hierarchy which has been changed significantly in GTK4.
2728
28-
29-
This was there in week 6 blog and oooo boi it really was, I keep coming back to this because of errors.
29+
This was there in week 6 blog and oooo boi it really was, I keep coming back to this because of errors.
3030
There seems to be a lot of bugs here and there and the timing for this has affected my own timeline on working on the next components because the following components are kind of dependent on the palettes themselves.
3131

3232
Every time I think I’ve solved one part, another subtle bug or incompatibility pops up, often related to how GTK4 expects widgets to interact or how events are propagated.
@@ -36,11 +36,10 @@ Every time I think I’ve solved one part, another subtle bug or incompatibility
3636

3737
I’ve been itching to record a demo of palettes in action, but there’s a major technical hurdle: on Wayland, widgets don’t have absolute screen coordinates, so palettes can’t reliably appear at the cursor or next to the invoking widget. This is a big departure from X11, where absolute positioning was straightforward. As a result, palettes sometimes pop up in unexpected places, which isn’t ideal for usability or demos. I’ve documented this as a TODO in the code and am actively looking for workarounds, but for now, the ToolbarBox example is at least functional.
3838

39-
I’m still planning to make a video walkthrough of the new palette system, but I want to make sure the positioning bug is fixed first so the demo truly reflects the intended user experience.
39+
I’m still planning to make a video walkthrough of the new palette system, but I want to make sure the positioning bug is fixed first so the demo truly reflects the intended user experience.
4040

4141
On a brighter note, finishing the graphics for widgets.py is a huge step forward. This file is one of the most important file for building and porting classic Sugar activities, so having it ready means I can finally shift my focus from infrastructure to actual porting of activities as well. There are still a few minor files left to port, but the bulk of the graphics work is behind me. Looking back, it’s satisfying to see how much of the library is now GTK4-ready.
4242

43-
4443
A lot of decisions make sense now after one writes on the same system and builds it for 8 weeks, one starts understanding the GTK4 way of doing things and also why the older decisions were made.
4544

4645
## Looking Ahead
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: "GSoC '25 Week 9 Update by Krish Pandya"
3+
excerpt: "Hello-World, Radio Palettes, and PyPI Release!"
4+
category: "DEVELOPER NEWS"
5+
date: "2025-08-03"
6+
slug: "2025-08-03-gsoc-25-mostlyk-week09"
7+
author: "@/constants/MarkdownFiles/authors/krish-pandya.md"
8+
tags: "gsoc25,sugarlabs,week09,mostlyk"
9+
image: "assets/Images/GSOC.webp"
10+
---
11+
12+
# Week 9: Hello-World, Radio Palettes, and PyPI Release
13+
14+
**Project:** [GTK4 Exploration](https://summerofcode.withgoogle.com/programs/2025/projects/rsHsYZKy)
15+
**Mentors:** [Walter Bender](https://github.com/walterbender), [Ibiam Chihurumnaya Ibiam](https://github.com/chimosky), [Juan Pablo Ugarte](https://github.com/xjuan)
16+
**Reporting Period:** July 29, 2025 – August 3, 2025
17+
18+
---
19+
20+
## The Week of Debugging, Demos, and Downloads
21+
22+
This week was a classic GSoC roller coaster: the codebase is now big enough that tiny bugs become huge blockers, and huge features sometimes just work. I spent hours chasing down a path bug that turned out to be a config detail and later on hard coded the paths for a workaround for now , radio tool buttons, palettes, and the first working Hello World activity are all live!
23+
24+
_Hello-World isn't pushed yet, will push it with bundle itself_
25+
26+
## Debugging
27+
28+
Early in the project, writing code was fast, just a few graphical interfaces, no integration headaches. Now, every little bug can block the whole flow. This week, I spent hours just figuring out why I couldn't get the art icons working properly, the button signals not ending like I wanted. Turns out, hardcoding the path was the way I have made it work, not elegant, but it works!
29+
30+
_A special shoutout to the [Stack Overflow](https://stackoverflow.com/questions/72303475/gtk4-gestureclick-no-released-signal-emitted) and [GNOME Discourse](https://discourse.gnome.org/t/gtk4-need-button-pressed-and-released-signals/8506) threads that helped me fix signaling in Palettes._
31+
32+
## Radio Tool Buttons & Palettes: The Big Reveal
33+
34+
Let’s start with the fun stuff: radio tool buttons and radio palettes. After a lot of toolkit upgrades and some annoying GTK integration quirks, I finally got radio tool buttons working with their palettes. You can now select between states (eraser, pencil, etc.), and the palette stays in sync with the tool button.
35+
36+
Also do note: The color scheme is fully customizable via my config, sooo the rainbowish borders you see in the demo is all me, not GTK4 defaults.
37+
38+
Here’s a quick breakdown of what’s working:
39+
( This is shown in the video which I have been delaying since the past few weeks! )
40+
41+
[youtube: gbaG9CaJJ-U]
42+
43+
- Radio Tool Buttons: Integrated with radio palettes, stateful selection (eraser, pencil, pen, etc.)
44+
45+
- Palette Groups: Grouped palettes now show and hide correctly, with proper event handling
46+
47+
- Menu Palettes: Custom content, icons, and actions all working
48+
49+
- ToolbarBox Example: Classic Sugar toolbar replicated, icons and colors working (though I need to fix icon sizes)
50+
51+
- Buffer Loading in Icon: Fixed buffer loading for icons, so custom SVGs and PNGs now render as expected
52+
53+
---
54+
55+
## Hello-World Activity: Actually Live
56+
57+
The big milestone this week: the Hello-World activity is up and running. I spent a lot of time emulating desktop environments (GNOME, KDE, Hyprland etc.) to make sure the UI looks right, even if some backend arguments are a bit hacky for now. The circular CSS isn’t perfect yet, but the basics are solid. This is the first real step toward porting and bundling activities for Sugar GTK4.
58+
59+
## PyPI Release
60+
61+
You can now download and install the toolkit directly from PyPI:
62+
63+
[https://pypi.org/project/sugar-toolkit-gtk4/#description](https://pypi.org/project/sugar-toolkit-gtk4/#description)
64+
65+
```
66+
pip install sugar-toolkit-gtk4
67+
```
68+
69+
We will change the authors and maintainers as GSoC comes to an end to Sugar Labs.
70+
This makes it much easier for others to try out the toolkit and start porting their own activities. Publishing is now automated via GitHub Actions—so every new release is just a push away.
71+
72+
---
73+
74+
## Reflection & Next Steps
75+
76+
After nine weeks of building, breaking, and rebuilding, I’m starting to appreciate how much the little details matter. Debugging path issues, integrating palettes, and getting activities to actually launch has taught me a ton about GTK4’s quirks and strengths. The toolkit is finally at a point where I can start porting real activities.
77+
78+
Next up:
79+
80+
- Polish Hello-World and fix icon sizing
81+
- Clean up debug statements and hardcoded paths
82+
- Continue porting and refining the toolkit
83+
- Add widgets example, presence and datastore from old library.
84+
85+
---
86+
87+
## Links
88+
89+
- [(sugar-toolkit-gtk4-py)](https://github.com/MostlyKIGuess/sugar-toolkit-gtk4-py)
90+
- [Game Demo Video](https://youtu.be/gbaG9CaJJ-U)
91+
- [PyPI Release](https://pypi.org/project/sugar-toolkit-gtk4/#description)
92+
- [Stack Overflow: GTK4 GestureClick](https://stackoverflow.com/questions/72303475/gtk4-gestureclick-no-released-signal-emitted)
93+
- [GNOME Discourse: GTK4 Button Signals](https://discourse.gnome.org/t/gtk4-need-button-pressed-and-released-signals/8506)

0 commit comments

Comments
 (0)