Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Content.Client/Disposal/Mailing/MailingUnitWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
Access="Public"
Text="{Loc 'ui-disposal-unit-button-eject'}"
StyleClasses="OpenBoth" />
<CheckButton Name="Power"
Access="Public"
Text="{Loc 'ui-disposal-unit-button-power'}"
StyleClasses="OpenLeft" />
<Button Name="Power"
Access="Public"
Text="{Loc 'ui-disposal-unit-button-power'}"
StyleClasses="OpenLeft" />
</BoxContainer>
</BoxContainer>
</controls:FancyWindow>
8 changes: 4 additions & 4 deletions Content.Client/Disposal/Unit/DisposalUnitWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
Access="Public"
Text="{Loc 'ui-disposal-unit-button-eject'}"
StyleClasses="OpenBoth" />
<CheckButton Name="Power"
Access="Public"
Text="{Loc 'ui-disposal-unit-button-power'}"
StyleClasses="OpenLeft" />
<Button Name="Power"
Access="Public"
Text="{Loc 'ui-disposal-unit-button-power'}"
StyleClasses="OpenLeft" />
</BoxContainer>
</BoxContainer>
</controls:FancyWindow>
5 changes: 3 additions & 2 deletions Content.Client/Instruments/UI/ChannelsMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<Button Name="AllButton" Text="{Loc 'instruments-component-channels-all-button'}" HorizontalExpand="true" VerticalExpand="true" SizeFlagsStretchRatio="1"/>
<Button Name="ClearButton" Text="{Loc 'instruments-component-channels-clear-button'}" HorizontalExpand="true" VerticalExpand="true" SizeFlagsStretchRatio="1"/>
</BoxContainer>
<CheckButton Name="DisplayTrackNames"
Text="{Loc 'instruments-component-channels-track-names-toggle'}" />
<Control MinHeight="5"/>
<SwitchButton Name="DisplayTrackNames"
Text="{Loc 'instruments-component-channels-track-names-toggle'}" />
</BoxContainer>
</DefaultWindow>
1 change: 0 additions & 1 deletion Content.Client/Instruments/UI/ChannelsMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ protected override void EnteredTree()

private void OnDisplayTrackNamesPressed(BaseButton.ButtonEventArgs obj)
{
DisplayTrackNames.SetClickPressed(!DisplayTrackNames.Pressed);
Populate();
}

Expand Down
4 changes: 1 addition & 3 deletions Content.Client/Power/APC/UI/ApcMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
<!-- Power On/Off -->
<Label Text="{Loc 'apc-menu-breaker-label'}" HorizontalExpand="True"
StyleClasses="StatusFieldTitle" MinWidth="120"/>
<BoxContainer Orientation="Horizontal" MinWidth="90">
<Button Name="BreakerButton" Text="{Loc 'apc-menu-breaker-button'}" HorizontalExpand="True"/>
</BoxContainer>
<SwitchButton Name="BreakerButton" MinWidth="90"/>
<!--Charging Status-->
<Label Text="{Loc 'apc-menu-external-label'}" StyleClasses="StatusFieldTitle" MinWidth="120" />
<Label Name="ExternalPowerStateLabel" Text="{Loc 'apc-menu-power-state-good'}" />
Expand Down
5 changes: 1 addition & 4 deletions Content.Client/Power/APC/UI/ApcMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ public void UpdateState(BoundUserInterfaceState state)
{
var castState = (ApcBoundInterfaceState) state;

if (!BreakerButton.Disabled)
{
BreakerButton.Pressed = castState.MainBreaker;
}
BreakerButton.Pressed = castState.MainBreaker;

if (PowerLabel != null)
{
Expand Down
42 changes: 25 additions & 17 deletions Content.Client/Stylesheets/StyleNano.cs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this #28356 got merged these need to use sheetlets. Here is the forum post for the breaking change:
Space Station 14 Forum - Stylesheet Overhaul

Here is the PR for the updated UI documentation:
space-wizards/docs#269

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be able to update the styles sometime this week.

I will note that this isn't the only thing this PR needs; it's still waiting on the engine PR.

Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,12 @@ public StyleNano(IResourceCache resCache) : base(resCache)
var monotoneCheckBoxTextureChecked = resCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_checkbox_checked.svg.96dpi.png");
var monotoneCheckBoxTextureUnchecked = resCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_checkbox_unchecked.svg.96dpi.png");

// SwitchButton
var switchButtonTextureUnchecked = resCache.GetTexture("/Textures/Interface/Nano/toggleswitch_off.svg.96dpi.png");
var switchButtonTextureChecked = resCache.GetTexture("/Textures/Interface/Nano/toggleswitch_on.svg.96dpi.png");
var switchButtonTextureDisabledUnchecked = resCache.GetTexture("/Textures/Interface/Nano/toggleswitch_disabled_off.svg.96dpi.png");
var switchButtonTextureDisabledChecked = resCache.GetTexture("/Textures/Interface/Nano/toggleswitch_disabled_on.svg.96dpi.png");

// Tooltip box
var tooltipTexture = resCache.GetTexture("/Textures/Interface/Nano/tooltip.png");
var tooltipBox = new StyleBoxTexture
Expand Down Expand Up @@ -1016,26 +1022,28 @@ public StyleNano(IResourceCache resCache) : base(resCache)
new StyleProperty(TextureRect.StylePropertyTexture, monotoneCheckBoxTextureChecked),
}),

// Tooltip
new StyleRule(new SelectorElement(typeof(Tooltip), null, null, null), new[]
{
new StyleProperty(PanelContainer.StylePropertyPanel, tooltipBox)
}),
// SwitchButton
Element<SwitchButton>().Prop(SwitchButton.StylePropertySeparation, 10),

new StyleRule(new SelectorElement(typeof(PanelContainer), new [] { StyleClassTooltipPanel }, null, null), new[]
{
new StyleProperty(PanelContainer.StylePropertyPanel, tooltipBox)
}),
Child().Parent(Element<SwitchButton>())
.Child(Element<TextureRect>())
.Prop(TextureRect.StylePropertyTexture, switchButtonTextureUnchecked),

new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {"speechBox", "sayBox"}, null, null), new[]
{
new StyleProperty(PanelContainer.StylePropertyPanel, tooltipBox)
}),
Child().Parent(Element<SwitchButton>().Pseudo(SwitchButton.StylePseudoClassPressed))
.Child(Element<TextureRect>())
.Prop(TextureRect.StylePropertyTexture, switchButtonTextureChecked),

new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {"speechBox", "whisperBox"}, null, null), new[]
{
new StyleProperty(PanelContainer.StylePropertyPanel, whisperBox)
}),
Child().Parent(Element<SwitchButton>().Pseudo(SwitchButton.StylePseudoClassDisabled))
.Child(Element<TextureRect>())
.Prop(TextureRect.StylePropertyTexture, switchButtonTextureDisabledUnchecked),

Child().Parent(Element<SwitchButton>().Pseudo(SwitchButton.StylePseudoClassPressed).Pseudo(SwitchButton.StylePseudoClassDisabled))
.Child(Element<TextureRect>())
.Prop(TextureRect.StylePropertyTexture, switchButtonTextureDisabledChecked),

Child().Parent(Element<SwitchButton>().Pseudo(SwitchButton.StylePseudoClassDisabled))
.Child(Element<Label>())
.Prop(Label.StylePropertyFontColor, DisabledFore),

new StyleRule(new SelectorChild(
new SelectorElement(typeof(PanelContainer), new[] {"speechBox", "whisperBox"}, null, null),
Expand Down
1 change: 0 additions & 1 deletion Resources/Locale/en-US/ui/power-apc.ftl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apc-menu-title = APC
apc-menu-breaker-label = Main Breaker
apc-menu-breaker-button = Toggle
apc-menu-power-label = Load
apc-menu-external-label = External Power
apc-menu-charge-label = {$percent} Charged
Expand Down
68 changes: 68 additions & 0 deletions Resources/Textures/Interface/Nano/toggleswitch_disabled_off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions Resources/Textures/Interface/Nano/toggleswitch_disabled_on.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions Resources/Textures/Interface/Nano/toggleswitch_off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading