Prelim: Style comboboxes

This commit is contained in:
Rory Fewell
2022-08-25 20:05:15 +01:00
committed by Rory Fewell
parent e79fd4cc7e
commit bc24716458
27 changed files with 324 additions and 24 deletions

View File

@@ -7,7 +7,7 @@
* Author(s): Rory Fewell <roryf@oddmatics.uk>
*/
$base_color: #FFFFFF !default;
$base_color: #FFFFFF !default;
$text_color: $threed_objects_fg !default;
$bg_color: $threed_objects_bg !default;
$fg_color: $threed_objects_fg !default;

View File

@@ -9,43 +9,36 @@
combobox
{
background-color: $base_color;
border: 1px solid $borders_color;
@include __wintc_apply_props($combobox_styles);
&:disabled
{
background-color: $insensitive_bg_color;
border-color: $insensitive_borders_color;
@include __wintc_apply_props($combobox_inactive_styles);
}
// Override button styles
//
button.combo:last-child
{
background-color: transparent;
background-image: url("../Resources/gtk-3.0/combobox_button.png");
background-position: right;
background-repeat: no-repeat;
background-size: contain;
border-width: 0px;
margin: 1px;
min-height: 18px;
min-width: 15px;
padding-right: 18px;
@include __wintc_apply_props($combobox_button_styles);
&:active
{
background-image: url("../Resources/gtk-3.0/combobox_button_press.png");
}
min-height: $combobox_button_height;
min-width: $combobox_button_width;
padding-right: $combobox_button_width;
&:hover
{
background-image: url("../Resources/gtk-3.0/combobox_button_hover.png");
@include __wintc_apply_props($combobox_button_hover_styles);
}
&:checked
{
@include __wintc_apply_props($combobox_button_press_styles);
}
&:disabled
{
background-image: url("../Resources/gtk-3.0/combobox_button_inactive.png");
@include __wintc_apply_props($combobox_button_inactive_styles);
}
}
@@ -57,6 +50,14 @@ combobox
border-width: 0px;
}
// HACK: This ensures the minimum height of a typical combobox drop down
// is 17px for native
//
cellview
{
margin-bottom: -1px; // This is AWFUL but I don't see any other way
}
// FIXME: Untested
//
&:drop(active)

View File

@@ -13,3 +13,4 @@
@import "start-menu";
@import "systray";
@import "taskband";
@import "combobox";

View File

@@ -0,0 +1,15 @@
/**
* combobox.scss - WinTC Combobox Theme Part Definitions
*
* This source-code is part of Windows XP stuff for XFCE:
* <<https://www.oddmatics.uk>>
*
* Author(s): Rory Fewell <roryf@oddmatics.uk>
*/
$combobox_styles: ();
$combobox_inactive_styles: ();
$combobox_button_styles: ();
$combobox_button_hover_styles: ();
$combobox_button_press_styles: ();
$combobox_button_inactive_styles: ();

View File

@@ -13,3 +13,4 @@
@import "start-menu";
@import "systray";
@import "taskband";
@import "combobox";

View File

@@ -0,0 +1,124 @@
/**
* combobox.scss - Theme Base Combobox Style Constants
*
* This source-code is part of Windows XP stuff for XFCE:
* <<https://www.oddmatics.uk>>
*
* Author(s): Rory Fewell <roryf@oddmatics.uk>
*/
$combobox_button_height: 17px !default;
$combobox_button_width: 16px !default;
//
// COMBOBOX ITSELF
//
$combobox_styles:
wintc_define_props_bg(
$combobox_styles,
true,
$window_bg,
undefined,
undefined,
undefined,
undefined
);
$combobox_styles:
wintc_define_props_borders(
$combobox_styles,
true,
solid,
2,
2,
2,
2,
undefined,
url('../Resources/entry_border.png')
);
$combobox_styles:
wintc_define_props_fg(
$combobox_styles,
true,
$window_fg,
undefined
);
$combobox_inactive_styles:
wintc_define_props_bg(
$combobox_inactive_styles,
true,
$bg_color,
undefined,
undefined,
undefined,
undefined
);
$combobox_inactive_styles:
wintc_define_props_borders(
$combobox_inactive_styles,
true,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
url('../Resources/entry_inactive_border.png')
);
$combobox_inactive_styles:
wintc_define_props_fg(
$combobox_inactive_styles,
true,
$insensitive_fg_color,
undefined
);
//
// BUTTON STYLES
//
$combobox_button_styles:
wintc_define_props_bg(
$combobox_button_styles,
true,
transparent,
contain,
no-repeat,
right,
url('../Resources/combobox_button.png')
);
$combobox_button_styles:
wintc_define_props_borders(
$combobox_button_styles,
true,
none,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined
);
$combobox_button_press_styles:
wintc_define_props_bg(
$combobox_button_press_styles,
true,
undefined,
undefined,
undefined,
undefined,
url('../Resources/combobox_button_press.png')
);
$combobox_button_inactive_styles:
wintc_define_props_bg(
$combobox_button_inactive_styles,
true,
undefined,
undefined,
undefined,
undefined,
url('../Resources/combobox_button_inactive.png')
);

View File

@@ -7,7 +7,7 @@
* Author(s): Rory Fewell <roryf@oddmatics.uk>
*/
@function __wintc_get_prop(
@function __wintc_try_get_prop(
$theme_part_map,
$rule_name
)
@@ -22,5 +22,38 @@
}
}
@return novalue;
}
@function __wintc_get_prop(
$theme_part_map,
$rule_name
)
{
$found: __wintc_try_get_prop($theme_part_map, $rule_name);
@if $found == novalue
{
@return 0px;
}
@return $found;
}
@function __wintc_get_prop_with_fallbacks(
$rule_name,
$theme_part_maps...
)
{
@each $theme_part_map in $theme_part_maps
{
$found: __wintc_try_get_prop($theme_part_map, $rule_name);
@if $found != novalue
{
@return $found;
}
}
@return 0px;
}

View File

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 648 B

View File

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 668 B

View File

Before

Width:  |  Height:  |  Size: 470 B

After

Width:  |  Height:  |  Size: 470 B

View File

Before

Width:  |  Height:  |  Size: 714 B

After

Width:  |  Height:  |  Size: 714 B

View File

@@ -7,4 +7,5 @@
* Author(s): Rory Fewell <roryf@oddmatics.uk>
*/
$borders_color: #7f9db9;
$borders_color: #7f9db9;
$insensitive_borders_color: $borders_color;

View File

@@ -13,3 +13,4 @@
@import "start-menu";
@import "systray";
@import "taskband";
@import "combobox";

View File

@@ -0,0 +1,66 @@
/**
* combobox.scss - Luna (Blue) Style Combobox Style Constants
*
* This source-code is part of Windows XP stuff for XFCE:
* <<https://www.oddmatics.uk>>
*
* Author(s): Rory Fewell <roryf@oddmatics.uk>
*/
$combobox_button_height: 18px;
$combobox_button_width: 15px;
//
// COMBOBOX ITSELF
//
$combobox_styles:
wintc_define_props_borders(
$combobox_styles,
false,
solid,
1,
1,
1,
1,
$borders_color,
undefined
);
$combobox_inactive_styles:
wintc_define_props_borders(
$combobox_inactive_styles,
false,
undefined,
undefined,
undefined,
undefined,
undefined,
$insensitive_borders_color,
undefined
);
//
// BUTTON STYLES
//
$combobox_button_styles:
wintc_define_props_box(
$combobox_button_styles,
false,
margin,
1,
1,
1,
1
);
$combobox_button_hover_styles:
wintc_define_props_bg(
$combobox_button_hover_styles,
false,
undefined,
undefined,
undefined,
undefined,
url('../Resources/combobox_button_hover.png')
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

View File

@@ -7,4 +7,5 @@
* Author(s): Rory Fewell <roryf@oddmatics.uk>
*/
$borders_color: #646464;
$borders_color: #646464;
$insensitive_borders_color: $borders_color;

View File

@@ -12,3 +12,4 @@
@import "entry";
@import "start-menu";
@import "taskband";
@import "combobox";

View File

@@ -0,0 +1,55 @@
/**
* combobox.scss - Professional Style Button Style Constants
*
* This source-code is part of Windows XP stuff for XFCE:
* <<https://www.oddmatics.uk>>
*
* Author(s): Rory Fewell <roryf@oddmatics.uk>
*/
$combobox_button_height: 18px;
$combobox_button_width: 16px;
//
// COMBOBOX ITSELF
//
$combobox_styles:
wintc_define_props_borders(
$combobox_styles,
false,
solid,
1,
1,
1,
1,
$borders_color,
undefined
);
$combobox_inactive_styles:
wintc_define_props_borders(
$combobox_inactive_styles,
false,
undefined,
undefined,
undefined,
undefined,
undefined,
$insensitive_borders_color,
undefined
);
//
// BUTTON STYLES
//
$combobox_button_hover_styles:
wintc_define_props_bg(
$combobox_button_hover_styles,
false,
undefined,
undefined,
undefined,
undefined,
url('../Resources/combobox_button_hover.png')
);