summaryrefslogtreecommitdiff
path: root/gtk/gtkcsstypesprivate.h
Commit message (Collapse)AuthorAgeFilesLines
* cssimagebuiltin: Remove icons that don't draw anything anymoreBenjamin Otte2016-05-051-2/+0
|
* cssnumbervalue: Remove gtk_css_number_value_get_unit()Benjamin Otte2016-02-131-0/+10
| | | | | | | This is in preparation for calc(), as calc(50% - 5px) is valid CSS but has 2 units. Instead, add a function to query a value's dimension (so we can differentiate lengths from numbers) and add a function to query if the value contains percentages.
* csstypes: Add GTK_CSS_AFFECTS_SYMBOLIC_ICONTimm Bäder2016-02-071-4/+7
|
* css: Add rem unitBenjamin Otte2016-02-041-0/+1
| | | | Good luck, Lapo.
* css: AFFFECTS_TEXT causes a resize, not a redrawBenjamin Otte2016-01-201-1/+0
| | | | | And we schedule the resize conditionally only when text is rendered but don't do that check for the redraw.
* Move the -gtk-icon-palette property upMatthias Clasen2016-01-131-1/+1
| | | | | Other properties will start depending on it in subsequent commits, so move it up to prevent ordering problems.
* Add the caret-color CSS propertyMatthias Clasen2016-01-081-0/+2
| | | | | | | | This property is defined in http://www.w3.org/TR/css3-ui/#caret-color. We also add a -gtk-secondary-caret-color property, since GTK+ has supported differently colored split cursors in the past. Unlike CSS, we don't support the weakly defined auto keyword, and just use currentColor as the initial value.
* css: Move enumBenjamin Otte2015-12-161-0/+33
| | | | I want to use it for a gadget, so it's better in the generic file.
* css: Add min-width/height CSS propertiesBenjamin Otte2015-12-151-0/+2
|
* css: Leftover renaming gtk-image-effect => icon-effectBenjamin Otte2015-12-041-1/+1
| | | | The previous renaming commit was incomplete, so here we go again.
* css: Introduct -gtk-icon-paletteBenjamin Otte2015-12-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This borrows heavily from the CSS4 fonts draft's font-palette, currently found at https://drafts.csswg.org/css-fonts-4/#font-palette-control The palette is mainly meant to trigger invalidations when colors used for symbolic icons change, to potentially allow extending supported colors in symbolic icons and to recolor all colors of a symbolic icon, not just the main one. The syntax for the property goes like this: Name: -gtk-icon-palette Value: default | name <color> [ , name <color> ]* Initial: default Applies to: all elements with icons Inherited: yes Animatable: yes, each color animated separately The property defines a list of named colors to be used when looking up icons. If a name is not defined, the value of the current "color" property is used. Which names are relevant depends on the icons in use. Currently symbolic icons make use of the names "success", "warning" and "error". "default" is the current behavior of the GTK when coloring symbolic icons and is equal to the string success @success_color, warning @warning_color, error @error_color Animation is crudely implemented by animating colors that are in both palettes that are animated and otherwise keeping the color from the palette that defined it. Note that this can cause a sharp cut at the beginning or end of the animation when the color goes away and will therefore be replaced with the color property. You can see an example of animations at http://gfycat.com/CautiousPeacefulIaerismetalmark
* css: Rename -gtk-image-effect to -gtk-icon-effectBenjamin Otte2015-12-021-4/+4
| | | | This is a property for icons, so we should name it as such.
* css: Remove macros that were used only with regionsBenjamin Otte2015-10-221-2/+0
|
* css: Add gtk_css_change_to_string()Benjamin Otte2015-08-271-0/+4
| | | | Nobody is able to look up those hex values.
* css: Fix GtkCssChange enumBenjamin Otte2015-08-271-36/+39
| | | | | Get rid of unused values (POSITION_ENUM) and use different values for NAME and ID.
* gtk/gtkcsstypesprivate.h: Fix BuildChun-wei Fan2015-08-061-43/+41
| | | | | | | | | | | The recent change to the enum declaration for GtkCssChange actually relied on compiler-dependent behavior, which also breaks the build on some non-GCC compilers, such as Visual Studio. As noted in the G_STATIC_ASSERT line just beneath this declaration, we need to change this enum declaration to #define's, in order to fix the build in such situations. https://bugzilla.gnome.org/show_bug.cgi?id=752814
* Don't trigger extraneous redraws on font / text-attr changesJasper St. Pierre2015-08-021-2/+0
| | | | | Any time that these change, we shouldn't need to force a redraw on the widget either.
* widget: Don't queue redraws for properties that don't affect anythingJasper St. Pierre2015-08-021-0/+9
| | | | | | Properties like transition-property might change when hovering over something, even if the property itself does not change. These properties don't affect drawing, so don't queue redraws for them.
* css: Fix GtkCssChange enumBenjamin Otte2015-07-171-35/+35
| | | | | | | | | | | Previously, the (1<<31) value evaluated to the 64bit value 0xFFFFFFFF80000000 instead of 0x0000000080000000 Avoid this by explicitly casting the value to unsigned long long. Also cast all values to unsigned long long to achieve consistency and hopefully in the future get new values added the same way.
* css: support text-decoration-stylePaolo Borelli2015-07-061-0/+7
| | | | | The support is limited to underline single, double and wavy, which is what pango has today.
* csstypes: expand GtkCssChange enumBenjamin Otte2015-07-061-24/+51
| | | | | | | | Instead of GTK_CSS_CHANGE_POSITION we now have 4 values: GTK_CSS_CHANGE_FIRST_CHILD, GTK_CSS_CHANGE_LAST_CHILD, GTK_CSS_CHANGE_NTH_CHILD and GTK_CSS_CHANGE_NTH_LAST_CHILD Nobody is using them directly yet.
* css: support text-decoration-colorPaolo Borelli2015-07-061-0/+1
|
* css: add support for text-decoration-linePaolo Borelli2015-07-061-0/+7
|
* label: add support for CSS letter-spacing propertyPaolo Borelli2015-07-061-4/+7
| | | | | Support letter-spacing CSS property on GtkLabel. Reftest is included.
* cssnode: Add API to query the timestampBenjamin Otte2015-03-181-2/+3
| | | | | | | ... and pass it to the API that computes new styles. A special timestamp of 0 means "please don't animate" and is used when no frame clock is available for a node.
* cssnode: Make parent style change part of GtkCssNodeBenjamin Otte2015-03-181-0/+1
|
* cssvalue: Remove GtkCssDependenciesBenjamin Otte2015-03-181-9/+0
| | | | They are not used anymore.
* cssmatcher: Allow widget path matcher to take a node declarationBenjamin Otte2015-03-181-0/+1
| | | | | | | The node declaration has the same functionality as gtk_css_node_declaration_add_to_widget_path(). So instead of using that function on a path, you can use the original path and the declaration in a matcher.
* cssnode: Split out a functionBenjamin Otte2015-03-181-1/+2
| | | | | | So far the vfunc is kinda quirky (the path argument is an out argument for something you have to free when you're done with the matcher), but I'm about to change that.
* css: Add -gtk-dpi CSS property hackBenjamin Otte2015-02-051-0/+1
| | | | | | | | | | | | | | | This property is necessary to ensure widgets automatically update after the text scale factor is changed desktop-wide. And if I'm already doing a property like this, I can make it overridable. So now you can override the dpi per-widget with CSS like GtkSwitch { -gtk-dpi: 48; } if you want to debug things. Long-term, we want to get rid of this property and insist on dpi being 96 everywhere and people can change the font size to get larger fonts.
* css: Add GtkCssStyleProperty::affects propertyBenjamin Otte2015-01-271-1/+1
|
* css: Add a -gtk-icon-theme CSS propertyBenjamin Otte2015-01-271-0/+1
| | | | | | | | | The property is useless to set (it only allows 'initial', 'inherit' and 'unset' as values), but it is used to track changes to the icon theme. And as such, it can ensure that widgets can track when they need to reload icons. https://bugzilla.gnome.org/show_bug.cgi?id=743341
* css: Move icon properties to the endBenjamin Otte2015-01-201-4/+4
| | | | | | | | The order in which properties are defined depends on the order in which they are computed. And that means that properties can only depend on other properties that are defined before them. The next patches will need this reordering.
* cssstyle: Rename GtkCssComputedValues => GtkCssStyleBenjamin Otte2015-01-071-1/+1
| | | | | This is literally just renaming of the object (and the associated source files). No other changes are in there.
* themingbackground: Add a quick exit for default caseBenjamin Otte2014-10-081-0/+3
| | | | | In the case where the background is completely transparent, exit the rendering functions before doing any expensive calculations.
* css: Have finer-grained definitions for effects of CSS propsBenjamin Otte2014-10-031-0/+38
| | | | | | This adds the GtkCssAffects enum and implements it for all style properties. So far, this is not exposed outside of the implementation file.
* css: Implement font-stretchEmmanuele Bassi2014-08-281-0/+1
| | | | | | | | | | | | | | The font-stretch CSS property is defined in the Level 3 CSS Fonts module, available at: http://dev.w3.org/csswg/css-fonts/#propdef-font-stretch It allows defining a normal, condensed, or expanded face to the font description. Pango already supports it, so this is literally just the CSS parser machinery needed to bridge our CSS to the FontDescription API. https://bugzilla.gnome.org/show_bug.cgi?id=735593
* stylecontext: Remove GTK_CSS_CHANGE_FORCE_INVALIDATEBenjamin Otte2014-08-211-1/+0
| | | | | | This was introduced as a hackish way in 3.6 to make font updates propagate properly. But since then, font handling has been changed and this flag is no longer necessary.
* css: Add a -gtk-icon-style propertyBenjamin Otte2014-05-141-0/+7
| | | | | | | | | | | | | The values can be: "requested" - the style as requested "regular" - use a regular full-color icon "symbolic" - use a symbolic icon The property defaults to "requested", so no changes should be seen unless CSS overrides it. It is also inherited, so that using this CSS .toolbar { -gtk-icon-style: symbolic; } is enough to force the whole toolbar to use symbolic icons.
* css: Add -gtk-icon-transform propertyBenjamin Otte2014-05-141-0/+1
| | | | | This property allows transforming icons and is mainly intended to be used for spinner animations.
* css: Add -gtk-icon-source propertyBenjamin Otte2014-05-141-0/+1
| | | | | This is to be used for rendering icon content via CSS, such as spinners or checkboxes.
* css: add properties for outline-radiusCosimo Cecchi2014-05-011-0/+4
| | | | | | Both a shorthand and individual properties. This is not officially part of the CSS standard, but there's precedence for it at least in Mozilla: https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius
* css: Add a GtkCssValue for GtkCssImageEffectCosimo Cecchi2013-08-201-0/+7
| | | | | | | This will allow us to use the CSS machinery to apply a highlight or dim effect when images are prelit or insensitive. https://bugzilla.gnome.org/show_bug.cgi?id=705443
* css: Support opacityAlexander Larsson2013-02-071-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=687842
* css: Do get_change directly on the tree without matching firstAlexander Larsson2012-12-101-1/+3
| | | | | | Rather than first collecting matches and then getting the change for them we do the change collection directly on the tree. This is about twice as fast.
* css: Fix order of enumBenjamin Otte2012-12-011-4/+4
| | | | | We switched around the order in gtkcssenumvalue.h, we need to switch this order, too. Otherwise the parsing code will go bonkers.
* css: Add more features to font-size codeBenjamin Otte2012-12-011-0/+14
| | | | | | | | We now support the keywords (like xx-small, medium, larger, smaller...) and I've changed the default value to be "medium". This required some shuffling of the "get default font size" code. But all is well now.
* stylecontext: Add a flag to force style_updated() emissionBenjamin Otte2012-11-141-2/+3
| | | | | This is used in gtk_widget_reset_style() (via GTK_CSS_CHANGE_ANY) now, and that makes GtkSettings font related changes work again.
* css: Add forgotten enum valueBenjamin Otte2012-10-011-0/+1
| | | | This broke compilation in a7d213854460a7820d9665650a507081b9d196b7.
* symboliccolor: Change prototype of _gtk_symbolic_color_resolve_full()Benjamin Otte2012-09-281-0/+1
| | | | | We can juts pass a GtkStyleProviderPrivate, that one has the vfunc we want already. So no need to pass vfuncs anymore.