Commit b4e1e01a authored by Matthias Clasen's avatar Matthias Clasen

Include the Adwaita theme

This adds the resources for the Adwaita theme, and includes them
in libgtk, on all platforms.
parent 4c95dbb0
......@@ -1374,7 +1374,7 @@ gtktypebuiltins.c: $(gtk_public_h_sources) $(a11y_h_sources) $(deprecated_h_sour
&& cp xgen-gtbc gtktypebuiltins.c \
&& rm -f xgen-gtbc
gtk.gresource.xml:
gtk.gresource.xml: Makefile.am
$(AM_V_GEN) echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@; \
echo -e "<gresources>" >> $@; \
echo -e " <gresource prefix=\"/org/gtk/libgtk\">" >> $@; \
......@@ -1382,6 +1382,12 @@ gtk.gresource.xml:
n=`basename $$f`; \
echo -e " <file alias=\"theme/Raleigh.css\">theme/Raleigh/$$n</file>" >> $@; \
done; \
echo -e " <file alias=\"theme/Adwaita.css\">theme/Adwaita/gtk.css</file>" >> $@; \
echo -e " <file alias=\"theme/Adwaita-dark.css\">theme/Adwaita/gtk-dark.css</file>" >> $@; \
for f in $(srcdir)/resources/theme/Adwaita/assets/*; do \
n=`basename $$f`; \
echo -e " <file preprocess=\"to-pixdata\">theme/Adwaita/assets/$$n</file>" >> $@; \
done; \
if test "$(win32_theme)" = "yes"; then \
for f in $(srcdir)/resources/theme/win32/*.css; do \
n=`basename $$f`; \
......@@ -1399,7 +1405,21 @@ gtk.gresource.xml:
echo -e " </gresource>" >> $@; \
echo -e "</gresources>" >> $@;
adwaita_sources = \
resources/theme/Adwaita/assets.svg \
resources/theme/Adwaita/_colors.scss \
resources/theme/Adwaita/_common.scss \
resources/theme/Adwaita/_drawing.scss \
resources/theme/Adwaita/gtk.scss \
resources/theme/Adwaita/gtk-dark.scss \
resources/theme/Adwaita/parse-sass.sh \
resources/theme/Adwaita/render-assets.sh \
resources/theme/Adwaita/render-borders.sh \
resources/theme/Adwaita/assets.txt \
resources/theme/Adwaita/borders.txt
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/resources --generate-dependencies $(srcdir)/gtk.gresource.xml)
gtkresources.h: gtk.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gtk.gresource.xml \
--target=$@ --sourcedir=$(srcdir)/resources --c-name _gtk --generate-header --manual-register
......@@ -1977,6 +1997,7 @@ gsettings_SCHEMAS = \
EXTRA_DIST += \
$(resource_files) \
$(adwaita_sources) \
$(STOCK_ICONS) \
$(GENERATED_ICONS) \
$(gsettings_SCHEMAS) \
......
// When color definition differs for dark and light variant,
// it gets @if ed depending on $variant
$base_color: if($variant =='light', #fff, #333);
$bg_color: if($variant =='light', #ededed, #393f3f);
$fg_color: if($variant =='light', #2e3436, #eeeeec);
$selected_fg_color: #fff;
$selected_bg_color: if($variant =='light', #4a90d9, darken(#4a90d9,20%));
$selected_borders_color: if($variant == 'light', darken($selected_bg_color, 30%), darken($selected_bg_color,20%));
// FIXME dark variant color
$borders_color: if($variant =='light', darken($bg_color,30%), darken($bg_color,12%));
$borders_edge: if($variant =='light', white, transparentize($fg_color,.9));
$link_color: darken($selected_bg_color,10%);
$warning_color: #f57900;
$error_color: #cc0000;
$success_color: if($variant =='light', #73d216, darken(#73d216,10%));
$destructive_color: if($variant =='light', #ef2929, darken(#ef2929,10%));
$osd_fg_color: #fff;
$osd_bg_color: transparentize(#000,0.2);
$osd_borders_color: transparentize(#fff,0.8);
//insensitive state derived colors
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);
$insensitive_bg_color: mix($bg_color, $base_color, 60%);
$insensitive_borders_color: $borders_color;
//colors for the backdrop state, derived from the main colors.
$backdrop_base_color: if($variant =='light', darken($base_color,1%), darken($base_color,5%));
$backdrop_bg_color: $bg_color;
$backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 80%);
$backdrop_insensitive_color: if($variant =='light', darken($backdrop_bg_color,15%), lighten($backdrop_bg_color,5%));
$backdrop_borders_color: mix($borders_color, $bg_color, 90%);
//apps rely on some named colors to be exported
/* GTK NAMED COLORS */
@define-color theme_fg_color $fg_color;
@define-color theme_bg_color $bg_color;
@define-color theme_base_color $base_color;
@define-color theme_selected_bg_color $selected_bg_color;
@define-color theme_selected_fg_color $selected_fg_color;
@define-color insensitive_bg_color $insensitive_bg_color;
@define-color insensitive_fg_color $insensitive_fg_color;
@define-color insensitive_base_color $base_color;
@define-color theme_unfocused_fg_color $backdrop_fg_color;
@define-color theme_unfocused_bg_color $backdrop_bg_color;
@define-color theme_unfocused_base_color $backdrop_base_color;
@define-color theme_unfocused_selected_bg_color $selected_bg_color;
@define-color theme_unfocused_selected_fg_color $selected_fg_color;
@define-color borders $borders_color;
@define-color unfocused_borders $backdrop_borders_color;
@define-color warning_color $warning_color;
@define-color error_color $error_color;
@define-color success_color $success_color;
//@define-color desctructive_color $destructive_color
//WM
@define-color wm_title shade($fg_color, 1.8);
@define-color wm_unfocused_title $backdrop_fg_color;
@define-color wm_highlight $borders_edge;
@define-color wm_borders_edge $borders_edge;
@define-color wm_bg_a shade($bg_color, 1.2);
@define-color wm_bg_b $bg_color;
@define-color wm_shadow alpha(black, 0.35);
@define-color wm_border alpha(black, 0.18);
@define-color wm_button_hover_color_a shade($bg_color, 1.3);
@define-color wm_button_hover_color_b $bg_color;
@define-color wm_button_active_color_a shade($bg_color, 0.85);
@define-color wm_button_active_color_b shade($bg_color, 0.89);
@define-color wm_button_active_color_c shade($bg_color, 0.9);
//FIXME this is really an API
@define-color content_view_bg $base_color;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
checkbox-checked
checkbox-checked-hover
checkbox-checked-active
checkbox-checked-insensitive
checkbox-checked-backdrop
checkbox-checked-backdrop-insensitive
checkbox-unchecked
checkbox-unchecked-hover
checkbox-unchecked-active
checkbox-unchecked-insensitive
checkbox-unchecked-backdrop
checkbox-unchecked-backdrop-insensitive
checkbox-mixed
checkbox-mixed-hover
checkbox-mixed-active
checkbox-mixed-insensitive
checkbox-mixed-backdrop
checkbox-mixed-backdrop-insensitive
radio-checked
radio-checked-hover
radio-checked-active
radio-checked-insensitive
radio-checked-backdrop
radio-checked-backdrop-insensitive
radio-unchecked
radio-unchecked-hover
radio-unchecked-active
radio-unchecked-insensitive
radio-unchecked-backdrop
radio-unchecked-backdrop-insensitive
radio-mixed
radio-mixed-hover
radio-mixed-active
radio-mixed-insensitive
radio-mixed-backdrop
radio-mixed-backdrop-insensitive
checkbox-checked-dark
checkbox-checked-hover-dark
checkbox-checked-active-dark
checkbox-checked-insensitive-dark
checkbox-checked-backdrop-dark
checkbox-checked-backdrop-insensitive-dark
checkbox-unchecked-dark
checkbox-unchecked-hover-dark
checkbox-unchecked-active-dark
checkbox-unchecked-insensitive-dark
checkbox-unchecked-backdrop-dark
checkbox-unchecked-backdrop-insensitive-dark
checkbox-mixed-dark
checkbox-mixed-hover-dark
checkbox-mixed-active-dark
checkbox-mixed-insensitive-dark
checkbox-mixed-backdrop-dark
checkbox-mixed-backdrop-insensitive-dark
radio-checked-dark
radio-checked-hover-dark
radio-checked-active-dark
radio-checked-insensitive-dark
radio-checked-backdrop-dark
radio-checked-backdrop-insensitive-dark
radio-unchecked-dark
radio-unchecked-hover-dark
radio-unchecked-active-dark
radio-unchecked-insensitive-dark
radio-unchecked-backdrop-dark
radio-unchecked-backdrop-insensitive-dark
radio-mixed-dark
radio-mixed-hover-dark
radio-mixed-active-dark
radio-mixed-insensitive-dark
radio-mixed-backdrop-dark
radio-mixed-backdrop-insensitive-dark
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment