* removes transparency

* fit options
This commit is contained in:
Valtos
2024-04-23 00:50:07 +03:00
committed by GitHub
parent 9565de0262
commit 5d37092a0a
9 changed files with 17 additions and 89 deletions

View File

@@ -45,7 +45,6 @@ namespace Content.Client.Stylesheets
public const string StyleClassBorderedWindowPanel = "BorderedWindowPanel";
public const string StyleClassInventorySlotBackground = "InventorySlotBackground";
public const string StyleClassHandSlotHighlight = "HandSlotHighlight";
public const string StyleClassChatPanel = "ChatPanel";
public const string StyleClassChatSubPanel = "ChatSubPanel";
public const string StyleClassTransparentBorderedWindowPanel = "TransparentBorderedWindowPanel";
public const string StyleClassHotbarPanel = "HotbarPanel";
@@ -159,8 +158,6 @@ namespace Content.Client.Stylesheets
public const string StyleClassButtonColorGreen = "ButtonColorGreen";
public const string StyleClassButtonColorPurple = "ButtonColorPurple";
public static readonly Color ChatBackgroundColor = Color.FromHex("#25252ADD");
public override Stylesheet Stylesheet { get; }
public StyleNano(IResourceCache resCache) : base(resCache)
@@ -413,16 +410,12 @@ namespace Content.Client.Stylesheets
lineEdit.SetPatchMargin(StyleBox.Margin.All, 3);
lineEdit.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
var chatBg = new StyleBoxFlat
var chatSubBgTex = resCache.GetTexture("/Textures/Interface/Nano/chat_sub_background.png");
var chatSubBg = new StyleBoxTexture
{
BackgroundColor = ChatBackgroundColor
Texture = chatSubBgTex,
};
var chatSubBg = new StyleBoxFlat
{
BackgroundColor = ChatBackgroundColor,
};
chatSubBg.SetContentMarginOverride(StyleBox.Margin.All, 3);
chatSubBg.SetPatchMargin(StyleBox.Margin.All, 2);
var actionSearchBoxTex = resCache.GetTexture("/Textures/Interface/Nano/black_panel_dark_thin_border.png");
var actionSearchBox = new StyleBoxTexture
@@ -974,13 +967,6 @@ namespace Content.Client.Stylesheets
Element<TextEdit>().Pseudo(TextEdit.StylePseudoClassPlaceholder)
.Prop("font-color", Color.Gray),
// chat subpanels (chat lineedit backing, popup backings)
new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {StyleClassChatPanel}, null, null),
new[]
{
new StyleProperty(PanelContainer.StylePropertyPanel, chatBg),
}),
// Chat lineedit - we don't actually draw a stylebox around the lineedit itself, we put it around the
// input + other buttons, so we must clear the default stylebox
new StyleRule(new SelectorElement(typeof(LineEdit), new[] {StyleClassChatLineEdit}, null, null),
@@ -989,6 +975,13 @@ namespace Content.Client.Stylesheets
new StyleProperty(LineEdit.StylePropertyStyleBox, new StyleBoxEmpty()),
}),
// chat subpanels (chat lineedit backing, popup backings)
new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {StyleClassChatSubPanel}, null, null),
new[]
{
new StyleProperty(PanelContainer.StylePropertyPanel, chatSubBg),
}),
// Action searchbox lineedit
new StyleRule(new SelectorElement(typeof(LineEdit), new[] {StyleClassActionSearchBox}, null, null),
new[]