summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/resources/themes/stylesheets/ext4/default/widgets/_panel.scss
blob: f338a1af889bb5788b28d2f9f89ae134a7429380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
/**
  * @class Ext.Panel
  * Used to create the base structure of an Ext.Panel
  */
@mixin extjs-panel {
    .#{$prefix}panel,
    .#{$prefix}plain {
        overflow: hidden;
        position: relative;
    }
    
     @if $include-ie {
        // Workaround for disappearing right edge in IE6
        .#{$prefix}ie {
            .#{$prefix}panel-header,
            .#{$prefix}panel-header-tl,
            .#{$prefix}panel-header-tc,
            .#{$prefix}panel-header-tr,
            .#{$prefix}panel-header-ml,
            .#{$prefix}panel-header-mc,
            .#{$prefix}panel-header-mr,
            .#{$prefix}panel-header-bl,
            .#{$prefix}panel-header-bc,
            .#{$prefix}panel-header-br {
                zoom: 1;
            }
        }
        // Fix for IE8 clipping. EXTJSIV-1553
        .#{$prefix}ie8 {
            td.#{$prefix}frame-mc {
                vertical-align: top;
            }
        }
    }
    
    //panel header
    .#{$prefix}panel-header {
        padding: $panel-header-padding;
    }
    
    .#{$prefix}panel-header-icon,
    .#{$prefix}window-header-icon {
        width:16px;
        height:16px;
        background-repeat:no-repeat;
        background-position:0 0;
        vertical-align:middle;
        margin-right:4px;
        margin-top:-1px;
        margin-bottom:-1px;
    }
    
    .#{$prefix}panel-header-draggable,
    .#{$prefix}panel-header-draggable .#{$prefix}panel-header-text,
    .#{$prefix}window-header-draggable,
    .#{$prefix}window-header-draggable .#{$prefix}window-header-text{
        cursor: move;
    }

    // A ghost is just a Panel. The only extra it needs is opacity.
    // TODO: Make opacity a variable
    .#{$prefix}panel-ghost, .#{$prefix}window-ghost {
        @include opacity(0.65);
        cursor: move;
    }

    .#{$prefix}panel-header-horizontal, .#{$prefix}window-header-horizontal, .#{$prefix}btn-group-header-horizontal {
        .#{$prefix}panel-header-body, .#{$prefix}window-header-body, .#{$prefix}btn-group-header-body {
            width: 100%;
        }
    }

    .#{$prefix}panel-header-vertical, .#{$prefix}window-header-vertical, .#{$prefix}btn-group-header-vertical {
        .#{$prefix}panel-header-body, .#{$prefix}window-header-body, .#{$prefix}btn-group-header-body {
            height: 100%;
        }
    }

    // Vertical headers must be inline blocks so that they acquire width from the content
    .#{$prefix}panel-header-vertical, .#{$prefix}panel-header-vertical .#{$prefix}panel-header-body,
    .#{$prefix}btn-group-header-vertical, .#{$prefix}btn-group-header-vertical .#{$prefix}btn-group-header-body,
    .#{$prefix}window-header-vertical, .#{$prefix}window-header-vertical .#{$prefix}window-header-body {
        display: -moz-inline-stack;
        display: inline-block;
    }

    .#{$prefix}panel-header-text {
        @include no-select;
        white-space: nowrap;
    }

    .#{$prefix}panel-header-left,
    .#{$prefix}panel-header-right {
        .#{$prefix}vml-base {
            left: -3px !important;
        }
    }

    //panel body
    .#{$prefix}panel-body {
        overflow: hidden;
        position: relative;
        
        font-size: $panel-body-font-size;
    }

    .#{$prefix}panel-header-vertical {
        .#{$prefix}surface {
            margin-top: 2px;
        }
    }
    
    .#{$prefix}panel-header-plain-vertical {
        .#{$prefix}surface {
            margin-top: 0;
        }
    }
    
        
    .#{$prefix}panel-collapsed {
        .#{$prefix}panel-header-collapsed-border-top {
            border-bottom-width: $panel-header-border-width !important;
        }
        .#{$prefix}panel-header-collapsed-border-right {
            border-left-width: $panel-header-border-width !important;
        }
        .#{$prefix}panel-header-collapsed-border-bottom {
            border-top-width: $panel-header-border-width !important;
        }
        .#{$prefix}panel-header-collapsed-border-left {
            border-right-width: $panel-header-border-width !important;
        }
    }

    @if not $supports-gradients or $compile-all {
        .#{$prefix}nlg .#{$prefix}panel-header-vertical {
            .#{$prefix}frame-mc {
                background-repeat: repeat-y;
            }
        }
    }

    @if $include-panel-uis == true {
        @include extjs-panel-ui(
            'default',

            $ui-base-color: $panel-base-color,
            $ui-border-width: $panel-border-width,
            $ui-border-color: $panel-border-color,
            $ui-border-radius: $panel-border-radius,
            
            $ui-header-color: $panel-header-color,
            $ui-header-font-size: $panel-header-font-size,
            $ui-header-font-weight: $panel-header-font-weight,
            $ui-header-border-color: $panel-header-border-color,
            $ui-header-background-color: $panel-header-background-color,
            $ui-header-background-gradient: $panel-header-background-gradient,

            $ui-body-color: $panel-body-color,
            $ui-body-border-color: $panel-body-border-color,
            $ui-body-border-width: 1px,
            $ui-body-background-color: $panel-body-background-color
        );
        
        @include extjs-panel-ui(
            'default-framed',

            $ui-base-color: $panel-base-color,
            $ui-border-width: $panel-frame-border-width,
            $ui-border-color: $panel-frame-border-color,
            $ui-border-radius: $panel-frame-border-radius,

            $ui-header-color: $panel-header-color,
            $ui-header-font-size: $panel-header-font-size,
            $ui-header-font-weight: $panel-header-font-weight,
            $ui-header-border-color: $panel-frame-border-color,
            $ui-header-background-color: $panel-header-background-color,
            $ui-header-background-gradient: $panel-header-background-gradient,

            $ui-body-color: $panel-body-color,
            $ui-body-border-color: $panel-body-border-color,
            $ui-body-border-width: 0,
            $ui-body-background-color: $panel-frame-background-color
        );
    }

    .x-panel-header-plain,
    .x-panel-body-plain {
        border: 0;
        padding: 0;
    }
}

/**
  * @class Ext.Panel
  * Used to create a visual theme for an Ext.Panel
  */
@mixin extjs-panel-ui(
    $ui-label,

    $ui-base-color: null,

    $ui-border-color: null,
    $ui-border-radius: null,
    $ui-border-width: 0,

    $ui-header-color: null,
    $ui-header-font-family: $panel-header-font-family,
    $ui-header-font-size: $panel-header-font-size,
    $ui-header-font-weight: $panel-header-font-weight,
    $ui-header-border-color: $ui-border-color,
    $ui-header-background-color: null,
    $ui-header-background-gradient: matte,
    $ui-header-inner-border-color: null,

    $ui-body-color: null,
    $ui-body-border-color: null,
    $ui-body-border-width: null,
    $ui-body-border-style: solid,
    $ui-body-background-color: null,
    $ui-body-font-size: null,
    $ui-body-font-weight: null
){
    @if $ui-base-color != null {
        @if $ui-border-color == null { $ui-border-color: $ui-base-color; }

        @if $ui-header-color == null { $ui-header-color: #fff; }
        @if $ui-header-background-color == null { $ui-header-background-color: lighten($ui-base-color, 15); }
    }
    
    @if $ui-header-inner-border-color == null and $ui-header-background-color != null {
        $ui-header-inner-border-color: lighten($ui-header-background-color, 10);
    }

    .#{$prefix}panel-#{$ui-label} {
        @if $ui-border-color != null { border-color: $ui-border-color; }
    }

    // header
    .#{$prefix}panel-header-#{$ui-label} {
        @if $ui-header-font-size != null { font-size: $ui-header-font-size; }
        line-height: $panel-header-line-height;

        @if $ui-header-border-color != null {
            border-color: $ui-header-border-color;
            border-width: $panel-header-border-width;
            border-style: $panel-header-border-style;
        }

        @if $supports-gradients or $compile-all {
            @if $ui-header-background-color != null { @include background-gradient($ui-header-background-color, $ui-header-background-gradient); }

            @if $panel-header-inner-border and $ui-header-inner-border-color != null {
                @include inner-border(
                    $width: $panel-header-inner-border-width,
                    $color: $ui-header-inner-border-color
                );
            }
        }
    }
    
    // header background images
    @if $ui-header-background-color != null and $ui-header-background-gradient != null {
        @if not $supports-gradients or $compile-all {
            .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-top {
                background-image: theme-image($theme-name, 'panel-header/panel-header-#{$ui-label}-top-bg.gif');
            }
            
            .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-bottom {
                background-image: theme-image($theme-name, 'panel-header/panel-header-#{$ui-label}-bottom-bg.gif');
            }

            .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-left {
                background-image: theme-image($theme-name, 'panel-header/panel-header-#{$ui-label}-left-bg.gif');
            }

            .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-right {
                background-image: theme-image($theme-name, 'panel-header/panel-header-#{$ui-label}-right-bg.gif');
            }
        }
    }
    
    // header text
    .#{$prefix}panel-header-text-#{$ui-label} {
        @if $ui-header-color != null { color: $ui-header-color; }

        @if $ui-header-font-size != null {   font-size: $ui-header-font-size; }
        @if $ui-header-font-weight != null { font-weight: $ui-header-font-weight; }
        @if $ui-header-font-family != null { font-family: $ui-header-font-family; }
    }

    // body
    .#{$prefix}panel-body-#{$ui-label} {
        @if $ui-body-background-color != null { background: $ui-body-background-color; }
        @if $ui-body-border-color != null {     border-color: $ui-body-border-color; }
        @if $ui-body-color != null {            color: $ui-body-color; }
        @if $ui-body-font-size != null {        font-size: $ui-body-font-size; }
        @if $ui-body-font-weight != null {      font-size: $ui-body-font-weight; }
        
        @if $ui-body-border-width != null {
            border-width: $ui-body-border-width;
            @if $ui-body-border-style != null { border-style: $ui-body-border-style; }
        }
    }
    
    .#{$prefix}panel-collapsed {
        .#{$prefix}window-header-#{$ui-label},
        .#{$prefix}panel-header-#{$ui-label} {
            @if $ui-body-border-color != null { border-color: $ui-body-border-color; }
        }
    }

    .#{$prefix}panel-header-#{$ui-label}-vertical {
        @if $ui-body-border-color != null { border-color: $ui-body-border-color; }
    }

    @if $ui-base-color != null {
        @if $supports-gradients or $compile-all {
            .#{$prefix}panel-header-#{$ui-label}-left,
            .#{$prefix}panel-header-#{$ui-label}-right {
                @include background-gradient($ui-header-background-color, $ui-header-background-gradient, right);
            }
        }
    }

    @if $ui-border-radius != null {
        @include x-frame(
            'panel',
            $ui: '#{$ui-label}',

            /* Radius, width, padding and background-color */
            $border-radius   : $ui-border-radius,
            $border-width    : $ui-border-width,
            $padding         : $panel-frame-padding,
            $background-color: $ui-body-background-color
        );


        @include x-frame('panel-header', '#{$ui-label}-top',    top($ui-border-radius) right($ui-border-radius) 0 0,    $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient);
        @include x-frame('panel-header', '#{$ui-label}-right',  0 right($ui-border-radius) bottom($ui-border-radius) 0, $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient, false, right);
        @include x-frame('panel-header', '#{$ui-label}-bottom', 0 0 bottom($ui-border-radius) left($ui-border-radius),  $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient);
        @include x-frame('panel-header', '#{$ui-label}-left',   top($ui-border-radius) 0 0 left($ui-border-radius),     $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient, false, right);
        
        .#{$prefix}panel-header-#{$ui-label}-top {
            @include inner-border(1px 1px 0 1px, $ui-header-inner-border-color);
        }

        .#{$prefix}panel-header-#{$ui-label}-right {
            @include inner-border(1px 1px 1px 0, $ui-header-inner-border-color);
        }

        .#{$prefix}panel-header-#{$ui-label}-bottom {
            @include inner-border(0 1px 1px 1px, $ui-header-inner-border-color);
        }

        .#{$prefix}panel-header-#{$ui-label}-left {
            @include inner-border(1px 0 1px 1px, $ui-header-inner-border-color);
        }
    } @else {
        .#{$prefix}panel-collapsed {
            .#{$prefix}panel-header-#{$ui-label}-top {
                @include border-bottom-radius($ui-border-radius);
            }

            .#{$prefix}panel-header-#{$ui-label}-right {
                @include border-left-radius($ui-border-radius);
            }

            .#{$prefix}panel-header-#{$ui-label}-bottom {
                @include border-top-radius($ui-border-radius);
            }

            .#{$prefix}panel-header-#{$ui-label}-left {
                @include border-right-radius($ui-border-radius);
            }
        }
        
        .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-right {
            background-position: top right;
        }
        
        .#{$prefix}panel-header-#{$ui-label}-top {
            @include inner-border(1px 0 0 0, $ui-header-inner-border-color);
        }

        .#{$prefix}panel-header-#{$ui-label}-right {
            @include inner-border(0 1px 0 0, $ui-header-inner-border-color);
        }

        .#{$prefix}panel-header-#{$ui-label}-bottom {
            @include inner-border(0 0 1px, $ui-header-inner-border-color);
        }

        .#{$prefix}panel-header-#{$ui-label}-left {
            @include inner-border(0 0 0 1px, $ui-header-inner-border-color);
        }
    }
    
    .#{$prefix}nlg .#{$prefix}panel-header-#{$ui-label}-bottom {
        background-position: bottom left;
    }
    
    @if $ui-border-radius != null {
        .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-top {
            border-bottom-width: 1px !important;
        }

        .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-right {
            border-left-width: 1px !important;
        }

        .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-bottom {
            border-top-width: 1px !important;
        }

        .#{$prefix}panel .#{$prefix}panel-header-#{$ui-label}-left {
            border-right-width: 1px !important;
        }
        
        .#{$prefix}panel-header-#{$ui-label}-collapsed {
            @include border-radius($ui-border-radius);
        }
        
        @include x-frame('panel-header', '#{$ui-label}-collapsed-top',    top($ui-border-radius) right($ui-border-radius) bottom($ui-border-radius) left($ui-border-radius), $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient);
        @include x-frame('panel-header', '#{$ui-label}-collapsed-right',  top($ui-border-radius) right($ui-border-radius) bottom($ui-border-radius) left($ui-border-radius), $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient, false, right);
        @include x-frame('panel-header', '#{$ui-label}-collapsed-bottom', top($ui-border-radius) right($ui-border-radius) bottom($ui-border-radius) left($ui-border-radius), $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient);
        @include x-frame('panel-header', '#{$ui-label}-collapsed-left',   top($ui-border-radius) right($ui-border-radius) bottom($ui-border-radius) left($ui-border-radius), $ui-border-width, 4px 5px 4px 5px, $ui-header-background-color, $ui-header-background-gradient, false, right);
    }
    
    //background positioning of images
    .#{$prefix}panel-header-#{$ui-label}-right-tc,
    .#{$prefix}panel-header-#{$ui-label}-right-mc,
    .#{$prefix}panel-header-#{$ui-label}-right-bc {
        background-position: right 0;
    }
    
    .#{$prefix}panel-header-#{$ui-label}-bottom-tc,
    .#{$prefix}panel-header-#{$ui-label}-bottom-mc,
    .#{$prefix}panel-header-#{$ui-label}-bottom-bc {
        background-position: 0 bottom;
    }
}