|
| 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