]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * Creates a visual theme for an Ext.ProgressBar\r | |
3 | *\r | |
4 | * @param {string} $ui\r | |
5 | * The name of the UI being created. Can not included spaces or special punctuation\r | |
6 | * (used in CSS class names).\r | |
7 | *\r | |
8 | * @param {color} [$ui-border-color=$progress-border-color]\r | |
9 | * The border-color of the ProgressBar\r | |
10 | *\r | |
11 | * @param {color} [$ui-background-color=$progress-background-color]\r | |
12 | * The background-color of the ProgressBar\r | |
13 | *\r | |
14 | * @param {color} [$ui-bar-background-color=$progress-bar-background-color]\r | |
15 | * The background-color of the ProgressBar's moving element\r | |
16 | *\r | |
17 | * @param {string/list} [$ui-bar-background-gradient=$progress-bar-background-gradient]\r | |
18 | * The background-gradient of the ProgressBar's moving element. Can be either the name of\r | |
19 | * a predefined gradient or a list of color stops. Used as the `$type` parameter for\r | |
20 | * {@link Global_CSS#background-gradient}.\r | |
21 | *\r | |
22 | * @param {color} [$ui-color-front=$progress-text-color-front]\r | |
23 | * The color of the ProgressBar's text when in front of the ProgressBar's moving element\r | |
24 | *\r | |
25 | * @param {color} [$ui-color-back=$progress-text-color-back]\r | |
26 | * The color of the ProgressBar's text when the ProgressBar's 'moving element is not under it\r | |
27 | *\r | |
28 | * @param {number} [$ui-height=$progress-height]\r | |
29 | * The height of the ProgressBar\r | |
30 | *\r | |
31 | * @param {number} [$ui-border-width=$progress-border-width]\r | |
32 | * The border-width of the ProgressBar\r | |
33 | *\r | |
34 | * @param {number} [$ui-border-radius=$progress-border-radius]\r | |
35 | * The border-radius of the ProgressBar\r | |
36 | *\r | |
37 | * @param {string} [$ui-text-text-align=$progress-text-text-align]\r | |
38 | * The text-align of the ProgressBar's text\r | |
39 | *\r | |
40 | * @param {number} [$ui-text-font-size=$progress-text-font-size]\r | |
41 | * The font-size of the ProgressBar's text\r | |
42 | *\r | |
43 | * @param {string} [$ui-text-font-weight=$progress-text-font-weight]\r | |
44 | * The font-weight of the ProgressBar's text\r | |
45 | *\r | |
46 | * @member Ext.ProgressBar\r | |
47 | */\r | |
48 | @mixin extjs-progress-ui(\r | |
49 | $ui: null,\r | |
50 | \r | |
51 | $ui-border-color: $progress-border-color,\r | |
52 | $ui-background-color: $progress-background-color,\r | |
53 | \r | |
54 | $ui-bar-background-color: $progress-bar-background-color,\r | |
55 | $ui-bar-background-gradient: $progress-bar-background-gradient,\r | |
56 | \r | |
57 | $ui-color-front: $progress-text-color-front,\r | |
58 | $ui-color-back: $progress-text-color-back,\r | |
59 | $ui-height: $progress-height,\r | |
60 | $ui-border-width: $progress-border-width,\r | |
61 | $ui-border-radius: $progress-border-radius,\r | |
62 | $ui-text-text-align: $progress-text-text-align,\r | |
63 | $ui-text-font-size: $progress-text-font-size,\r | |
64 | $ui-text-font-weight: $progress-text-font-weight,\r | |
65 | $ui-text-font-family: $progress-text-font-family,\r | |
66 | \r | |
67 | // deprecated - use $ui instead\r | |
68 | $ui-label: null\r | |
69 | ){\r | |
70 | @if $ui == null {\r | |
71 | @if $ui-label != null {\r | |
72 | @warn '$ui-label is deprecated. Use $ui instead';\r | |
73 | $ui: $ui-label;\r | |
74 | } @else {\r | |
75 | // No @error "$ui is required";\r | |
76 | // See https://gist.github.com/MoOx/1671259\r | |
77 | @warn "#{error("$ui is required")}";\r | |
78 | }\r | |
79 | }\r | |
80 | \r | |
81 | $progress-content-height: $ui-height - vertical($ui-border-width);\r | |
82 | .#{$prefix}progress-#{$ui} {\r | |
83 | background-color: $ui-background-color;\r | |
84 | border-width: $ui-border-width;\r | |
85 | height: $ui-height;\r | |
86 | \r | |
87 | @if $ui-border-radius != 0 {\r | |
88 | @include border-radius($ui-border-radius);\r | |
89 | }\r | |
90 | @if not is-null($ui-border-color) {\r | |
91 | border-color: $ui-border-color;\r | |
92 | }\r | |
93 | \r | |
94 | .#{$prefix}progress-bar-#{$ui} {\r | |
95 | @if $ui-border-radius != 0 {\r | |
96 | @include border-radius($ui-border-radius);\r | |
97 | }\r | |
98 | @if not is-null($ui-bar-background-color) {\r | |
99 | @include background-gradient($ui-bar-background-color, $ui-bar-background-gradient);\r | |
100 | }\r | |
101 | @if $include-slicer-gradient and not is-null($ui-bar-background-gradient) {\r | |
102 | .#{$prefix}nlg & {\r | |
103 | background: repeat-x;\r | |
104 | background-image: slicer-background-image(progress-bar-#{$ui}, 'progress/progress-#{$ui}-bg');\r | |
105 | }\r | |
106 | }\r | |
107 | }\r | |
108 | \r | |
109 | .#{$prefix}progress-text {\r | |
110 | color: $ui-color-front;\r | |
111 | font-weight: $ui-text-font-weight;\r | |
112 | font-size: $ui-text-font-size;\r | |
113 | font-family: $ui-text-font-family;\r | |
114 | text-align: $ui-text-text-align;\r | |
115 | line-height: $progress-content-height;\r | |
116 | }\r | |
117 | \r | |
118 | .#{$prefix}progress-text-back {\r | |
119 | color: $ui-color-back;\r | |
120 | line-height: $progress-content-height;\r | |
121 | }\r | |
122 | }\r | |
123 | \r | |
124 | $stretch: slicer-background-stretch(progress-bar-#{$ui}, bottom);\r | |
125 | @include x-slicer(progress-bar-#{$ui});\r | |
126 | \r | |
127 | @if $include-ext-view-table {\r | |
128 | .#{$prefix}progressbar-#{$ui}-cell > .#{$prefix}grid-cell-inner,\r | |
129 | .#{$prefix}progressbarwidget-#{$ui}-cell > .#{$prefix}grid-cell-inner {\r | |
130 | padding-top: max(ceil(($grid-row-height - $ui-height) / 2), 0);\r | |
131 | padding-bottom: max(floor(($grid-row-height - $ui-height) / 2), 0);\r | |
132 | .#{$prefix}progress-#{$ui} {\r | |
133 | height: min($progress-height, $grid-row-height - 2);\r | |
134 | }\r | |
135 | }\r | |
136 | }\r | |
137 | }\r | |
138 | \r | |
139 | \r | |
140 | @if $include-progress-default-ui {\r | |
141 | @include extjs-progress-ui(\r | |
142 | $ui: 'default'\r | |
143 | );\r | |
144 | }\r |