Problem Description

Due to lack of logic structure and large number of special cases, Adwaita has become super hard to maintain because of the spit to multiple files and multiple selectors being applied and overriding (we found numerous sections that had no effect due to overrives from elsewhere).

Secondary Challenges

Testing -- there's a number of steps involving to see the effect of a change -- gresource generation requires a theme to be built and even then an application needs to be restarted. It would be desirable to have a file watcher in place that installs the theme into the jhbuild environment and some special runtime mode for applications to watch for theme changes.

External Assets -- it's way harder to maintain external assets, especially with colored elements that may get out of sync with the CSS chnages. It is desirable to keep basic box drawing in the theme itself (borders, shadows).

Broken Box Model -- box-shadow and margin are properties that are ignored most of the time, because gtk+ doesn't allotae space to draw them outside of the box.

Proposed Solutions

As a first step we'll try to test using SASS to get a solid logic structure based on widget types and keeping the same drawing blocks using mixins. If that ends up being a sane and legible structure we might replace SASS with supporing similar mechanisms in gtk+ itself (mixins, extends).

As there exists a possibility of folding the applicable SASS features into gtk+, we'll use the SCSS syntax rather than the more legible indentation based SASS syntax.

Proof of concept in wip/sass branch:

TODO / Encountered issues

- general

  • have a way to automagically remove borders when the element is touching windows edges (saves a lot of specialcasing) frame borders or other elements borders

- inline-toolbars

  • padding gets overriden by a mysterious thing.

- touch osd

  • cannot make .cursor-handle use -gtk-icon-source asset instead of background-image. Popovers make buttons semi-transparent.

- glitchy animations [FIXED]

  • spinners sometimes don't spin unless you bring up inspector. Seems to do it for the gtk3-demo 'animated backgrounds' as well.

- checkboxes & radios

  • would be great to do it asset-free. -gtk-icon-source paints over transparency, maybe we want to paint over backgroud? Or will -gtk-icontheme() work for background-image?

- buttons [FIXED]

  • we need a way to generally select flat buttons

- GtkSwitch [FIXED]

  • lacks hover state.

- GtkDialog [FIXED]

  • the keyboard focused button shrinks 1px per side.

    -GtkDialog-action-area-border should just be a padding the other parms should be just margins.

- GtkNotebook [FIXED]

  • notebook content frame (.notebook.frame) doesn't allow to set individidual borders.

- GtkColorScale

  • can't do much with the style atm, hence it's broken wrt several aspects. Ideally the color strip (or alpha strip) should be the a hardcoded background (background-image css speaking) of the GtkRange trough so that could be styled normally wrt borders, box-shadow, slider positioning and (focus) outline.

Design/Playground/MaintainableAdwaita (last edited 2014-07-07 17:12:45 by MatthiasClasen)