Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Fix race condition during the build

parent 8660e978
* Remove SASS deprecation warnings
* Fix theme name for GTK+2.0
* Document build_theme.sh
* Build the theme into ${CMAKE_BINARY_DIR}
$ButtonBackgroundAlternate:rgb(77,77,77);
$ButtonBackgroundNormal:rgb(49,54,59);
$ButtonDecorationFocus:rgb(61,174,233);
$ButtonDecorationHover:rgb(61,174,233);
$ButtonForegroundActive:rgb(61,174,233);
$ButtonForegroundInactive:189,195,199;
$ButtonForegroundLink:rgb(41,128,185);
$ButtonForegroundNegative:rgb(218,68,83);
$ButtonForegroundNeutral:rgb(246,116,0);
$ButtonForegroundNormal:rgb(239,240,241);
$ButtonForegroundPositive:rgb(39,174,96);
$ButtonForegroundVisited:rgb(127,140,141);
$DisabledColor:rgb(56,56,56);
$DisabledColorAmount:0;
$DisabledColorEffect:0;
$DisabledContrastAmount:0.65;
$DisabledContrastEffect:1;
$DisabledIntensityAmount:0.1;
$DisabledIntensityEffect:2;
$InactiveChangeSelectionColor:true;
$InactiveColor:rgb(112,111,110);
$InactiveColorAmount:0.025;
$InactiveColorEffect:2;
$InactiveContrastAmount:0.1;
$InactiveContrastEffect:2;
$InactiveEnable:false;
$InactiveIntensityAmount:0;
$InactiveIntensityEffect:0;
$SelectionBackgroundAlternate:rgb(29,153,243);
$SelectionBackgroundNormal:rgb(61,174,233);
$SelectionDecorationFocus:rgb(61,174,233);
$SelectionDecorationHover:rgb(61,174,233);
$SelectionForegroundActive:rgb(252,252,252);
$SelectionForegroundInactive:239,240,241;
$SelectionForegroundLink:rgb(253,188,75);
$SelectionForegroundNegative:rgb(218,68,83);
$SelectionForegroundNeutral:rgb(246,116,0);
$SelectionForegroundNormal:rgb(239,240,241);
$SelectionForegroundPositive:rgb(39,174,96);
$SelectionForegroundVisited:rgb(189,195,199);
$TooltipBackgroundAlternate:rgb(77,77,77);
$TooltipBackgroundNormal:rgb(49,54,59);
$TooltipDecorationFocus:rgb(61,174,233);
$TooltipDecorationHover:rgb(61,174,233);
$TooltipForegroundActive:rgb(61,174,233);
$TooltipForegroundInactive:189,195,199;
$TooltipForegroundLink:rgb(41,128,185);
$TooltipForegroundNegative:rgb(218,68,83);
$TooltipForegroundNeutral:rgb(246,116,0);
$TooltipForegroundNormal:rgb(239,240,241);
$TooltipForegroundPositive:rgb(39,174,96);
$TooltipForegroundVisited:rgb(127,140,141);
$ViewBackgroundAlternate:rgb(49,54,59);
$ViewBackgroundNormal:rgb(35,38,41);
$ViewDecorationFocus:rgb(61,174,233);
$ViewDecorationHover:rgb(61,174,233);
$ViewForegroundActive:rgb(61,174,233);
$ViewForegroundInactive:189,195,199;
$ViewForegroundLink:rgb(41,128,185);
$ViewForegroundNegative:rgb(218,68,83);
$ViewForegroundNeutral:rgb(246,116,0);
$ViewForegroundNormal:rgb(239,240,241);
$ViewForegroundPositive:rgb(39,174,96);
$ViewForegroundVisited:rgb(127,140,141);
$WMactiveBackground:rgb(49,54,59);
$WMactiveBlend:rgb(255,255,255);
$WMactiveForeground:rgb(239,240,241);
$WMinactiveBackground:rgb(49,54,59);
$WMinactiveBlend:rgb(75,71,67);
$WMinactiveForeground:rgb(127,140,141);
$WindowBackgroundAlternate:rgb(77,77,77);
$WindowBackgroundNormal:rgb(49,54,59);
$WindowDecorationFocus:rgb(61,174,233);
$WindowDecorationHover:rgb(61,174,233);
$WindowForegroundActive:rgb(61,174,233);
$WindowForegroundInactive:189,195,199;
$WindowForegroundLink:rgb(41,128,185);
$WindowForegroundNegative:rgb(218,68,83);
$WindowForegroundNeutral:rgb(246,116,0);
$WindowForegroundNormal:rgb(239,240,241);
$WindowForegroundPositive:rgb(39,174,96);
$WindowForegroundVisited:rgb(127,140,141);
......@@ -14,9 +14,9 @@ create_folders () {
build_sass() {
if command -v sassc >/dev/null 2>&1; then
sassc "$1" "$2"
sassc -I "$3" "$1" "$2"
else
sass --cache-location /tmp/sass-cache "$1" "$2"
sass -I "$3" --cache-location /tmp/sass-cache "$1" "$2"
fi
}
......@@ -38,13 +38,16 @@ install_theme () {
render_theme () {
create_folders "$2"
python3 render_assets.py "$1" "$2/assets"
build_sass gtk318/gtk.scss "$2/gtk-3.18/gtk.css"
build_sass gtk320/gtk.scss "$2/gtk-3.20/gtk.css"
cp -R gtk2/* "$2/gtk-2.0/"
python3 render_assets.py -c "$1" -a "$2/assets" -g "$2/gtk-2.0" -G "$2"
build_sass gtk318/gtk.scss "$2/gtk-3.18/gtk.css" "$2"
build_sass gtk320/gtk.scss "$2/gtk-3.20/gtk.css" "$2"
rm -f "$2/_global.scss"
install_theme "$2" "$3"
}
# TODO : add --help and improve parameter parsing
COLOR_SCHEME="$1"
INSTALL_TARGET="$2"
......
@import '../global';
@import 'global';
@import '../functions';
@import '../colors';
......
@import '../global';
@import 'global';
@import '../functions';
@import '../colors';
......
......@@ -6,6 +6,7 @@ import os
import errno
import sys
import re
import argparse
def make_sure_path_exists(path):
try:
......@@ -654,19 +655,18 @@ def mix(color, mix_color, amount):
return (r,g,b)
#___________________________________________________________________________________
if len(sys.argv) >= 2:
filename = sys.argv[1]
else:
filename = '/usr/share/color-schemes/Breeze.colors'
parser = argparse.ArgumentParser(description='Pregenerates Breeze assets according to the specified color scheme.')
parser.add_argument('--colorscheme', '-c', action='store', default='/usr/share/color-schemes/Breeze.colors', help='color scheme to use')
parser.add_argument('--assets-dir', '-a', action='store', default='assets', help='location of the directory to place assets')
parser.add_argument('--gtk2-dir', '-g', action='store', default='gtk2', help='location of gtk2 directory to define the colorscheme variables')
parser.add_argument('--gtk3-scss-dir', '-G', action='store', default='.', help='location of _global.scss to define the colorscheme variables')
if len(sys.argv) >= 3:
assets_path = sys.argv[2]
else:
assets_path = 'assets'
args = parser.parse_args()
assets_path = args.assets_dir
make_sure_path_exists(assets_path)
_colors = ReadKdeGlobals().read_globals(filename)
_colors = ReadKdeGlobals().read_globals(args.colorscheme)
border_color = Color(_colors,'WindowBackgroundNormal','WindowForegroundNormal', 0.75)
window_bg = Color(_colors,'WindowBackgroundNormal')
......@@ -746,7 +746,7 @@ mixed(border_color.rgb,window_bg.rgb,button_active.rgb)
toolbar(border_color.rgb,window_bg.rgb,button_hover.rgb)
gtk2 = open('gtk2/gtkrc', 'w')
gtk2 = open(os.path.join(args.gtk2_dir, 'gtkrc'), 'w')
gtk2.write(
'# Theme: Breeze-gtk\n'
'# Description: Breeze theme for GTK+2.0\n'
......@@ -781,7 +781,7 @@ gtk2.write(
)
gtk2.close()
gtk3 = open('_global.scss', 'w')
gtk3 = open(os.path.join(args.gtk3_scss_dir, '_global.scss'), 'w')
for key in sorted(_colors):
if key == 'DisabledColor' or key == 'InactiveColor':
gtk3.write('${0}:rgb({1});\n'.format(key,_colors[key]))
......
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