gtkfix

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gtkfix works around two things MyGo does on Linux.

Apply trims the room MyGo's window buttons take. With a hidden title bar MyGo shows the window buttons in a GtkHeaderBar laid over the page. GTK 3 gives a header bar an empty title label that is still MIN_TITLE_CHARS (5) characters wide, so the bar is about 80px wider than its buttons. MyGo reports the whole bar as the title bar's room, and the empty part takes the clicks over it, so the toolbar has to keep clear of it: a wide dead gap before the buttons. Shrinking the title's font to a pixel takes that width away. Drop it once MyGo sizes the bar to its buttons.

TextColor keeps text in its own color. MyGo rasterizes glyphs with cairo in grayscale and takes any glyph whose channels differ for a color glyph (an emoji), drawn in its own color. cairo before 1.17.8 turns grayscale into subpixel antialiasing wherever the font fontconfig matched has a subpixel order (rgba), from the desktop's subpixel setting or from fontconfig's own rules, so every glyph comes out white with a green alpha, whatever the text's color: pale green text, unreadable on light fills and tooltips (Debian 12, Ubuntu 22.04, RHEL 8/9, KylinSec and the like). Matching fonts without a subpixel order keeps grayscale gray; MyGo's own subpixel glyphs still ask for their order. Drop it once MyGo forces grayscale itself or no longer supports such a cairo.

Index

Constants

View Source
const CSS = `` /* 188-byte string literal not displayed */

CSS is the style that shrinks the empty title of the buttons' bar. The class is the one MyGo puts on that bar only.

View Source
const Fontconfig = `` /* 288-byte string literal not displayed */

Fontconfig is the configuration TextColor adds after the system's: fonts match without a subpixel order, as patterns and as fonts.

Variables

This section is empty.

Functions

func Apply

func Apply() bool

Apply adds CSS for the default screen, through the GTK that MyGo has already loaded. Without GTK it does nothing. Call it on the main thread once the app is ready.

func TextColor added in v0.0.18

func TextColor() bool

TextColor adds Fontconfig to the current fontconfig configuration, through the fontconfig GTK has loaded, and reports whether it took. Call it on the main thread once the app is ready, before the first window lays out text.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL