Projet

Général

Profil

0001-misc-do-not-generate-unused-png-icon-variants-72513.patch

Frédéric Péters, 15 décembre 2022 17:30

Télécharger (2,65 ko)

Voir les différences:

Subject: [PATCH] misc: do not generate unused png icon variants (#72513)

 gadjo/static/css/gadjo.scss |  4 +---
 setup.py                    | 10 ++--------
 2 files changed, 3 insertions(+), 11 deletions(-)
gadjo/static/css/gadjo.scss
1076 1076
	border-radius: 2px;
1077 1077
}
1078 1078

  
1079
$string-color: str-slice($primary-color + '', 2);
1080

  
1081 1079
$appicons: add, agendas, announces, bankcard, book, calendar, cards, categories, clock, counter, data, facturier, forms, gis, grid, home, identity-management, lingo, mail, management, organizational-units, passerelle, password, phone, portal, portal-agent, porte-doc, roles, security, services, settings, statistics, studio, submission, system, texts, theme, users, workflows;
1082 1080

  
1083 1081
@each $appicon in $appicons {
1084
	ul#sidepage-menu li a.icon-#{$appicon} { background-image: url(icons/#{$appicon}.small.#{$string-color}.png); }
1082
	ul#sidepage-menu li a.icon-#{$appicon} { background-image: url(icons/#{$appicon}.small.png); }
1085 1083
	ul.apps li.icon-#{$appicon} a { background-image: url(icons/#{$appicon}.large.png); }
1086 1084
	ul.apps li.icon-#{$appicon} a:hover { background-image: url(icons/#{$appicon}.large-hover.png); }
1087 1085
}
setup.py
142 142
        if not os.path.exists(destpath):
143 143
            os.mkdir(destpath)
144 144
        variants_applications = {
145
            'small': {'colour': 'e7e7e7', 'width': '40'},
146
            'small.white': {'colour': 'ffffff', 'width': '40'},
147
            'small.386ede': {'colour': '386ede', 'width': '40'},
148
            'small.ff375e': {'colour': 'ff375e', 'width': '40'},
149
            'small.6f2b92': {'colour': '6f2b92', 'width': '40'},
145
            'small': {'colour': '386ede', 'width': '40'},
150 146
            'large': {'colour': 'e7e7e7', 'width': '80'},
151 147
            'large-hover': {'colour': 'bebebe', 'width': '80'},
152 148
        }
153 149
        variants_actions = {
154
            'small.386ede': {'colour': '386ede', 'width': '40'},
155
            'small.ff375e': {'colour': 'ff375e', 'width': '40'},
156
            'small.6f2b92': {'colour': '6f2b92', 'width': '40'},
150
            'small': {'colour': '386ede', 'width': '40'},
157 151
            'hover': {'colour': '2b2b2b', 'width': '40'},
158 152
        }
159 153
        for basepath, dirnames, filenames in os.walk('icons'):
160
-