mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
Revert old Material palette style
https://files.facepunch.com/louie/1b1611b1/sbox-dev_ryYgKhzZ5X.png
This commit is contained in:
@@ -16,19 +16,18 @@ class ActiveMaterialWidget : ControlWidget
|
||||
|
||||
ToolTip = "";
|
||||
|
||||
_paletteStrip = Layout.Add( new MaterialPaletteWidget() );
|
||||
_paletteStrip.MaterialClicked += OnPaletteMaterialClicked;
|
||||
_paletteStrip.FixedHeight = FixedHeight - 8;
|
||||
_paletteStrip.FixedWidth = 64;
|
||||
_paletteStrip.GetActiveMaterial = () => _materialWidget.Material;
|
||||
|
||||
Layout.AddSpacingCell( 1 );
|
||||
|
||||
_materialWidget = Layout.Add( new MaterialWidget() );
|
||||
_materialWidget.ToolTip = "Active Material";
|
||||
_materialWidget.FixedSize = FixedHeight - 22;
|
||||
_materialWidget.Cursor = CursorShape.Finger;
|
||||
|
||||
Layout.AddSpacingCell( 1 );
|
||||
|
||||
_paletteStrip = Layout.Add( new MaterialPaletteWidget() );
|
||||
_paletteStrip.MaterialClicked += OnPaletteMaterialClicked;
|
||||
_paletteStrip.FixedHeight = FixedHeight - 8;
|
||||
_paletteStrip.FixedWidth = 64;
|
||||
_paletteStrip.GetActiveMaterial = () => _materialWidget.Material;
|
||||
|
||||
Frame();
|
||||
}
|
||||
@@ -98,7 +97,7 @@ class ActiveMaterialWidget : ControlWidget
|
||||
base.OnMouseClick( e );
|
||||
|
||||
// If we are selecting the Material Widget continue. (Probably better way of doing this)
|
||||
if ( _materialWidget.ContentRect.IsInside( e.LocalPosition ) )
|
||||
if ( !_materialWidget.ContentRect.IsInside( e.LocalPosition ) )
|
||||
return;
|
||||
|
||||
if ( ReadOnly ) return;
|
||||
|
||||
@@ -502,21 +502,21 @@ public class MaterialPaletteWidget : Widget
|
||||
}
|
||||
else
|
||||
{
|
||||
var baseFill = Theme.ControlBackground;
|
||||
var baseLine = Color.Transparent;
|
||||
var iconColor = Theme.TextLight;
|
||||
var baseFill = Theme.Text.WithAlpha( 0.01f );
|
||||
var baseLine = Theme.Text.WithAlpha( 0.1f );
|
||||
var iconColor = Theme.Text.WithAlpha( 0.1f );
|
||||
|
||||
if ( Paint.HasMouseOver )
|
||||
{
|
||||
baseFill = Theme.ControlBackground;
|
||||
baseLine = Color.Transparent;
|
||||
iconColor = Theme.TextLight.Lighten( 0.8f );
|
||||
baseFill = Theme.Text.WithAlpha( 0.04f );
|
||||
baseLine = Theme.Text.WithAlpha( 0.2f );
|
||||
iconColor = Theme.Text.WithAlpha( 0.2f );
|
||||
}
|
||||
else
|
||||
{
|
||||
baseFill = Theme.ControlBackground;
|
||||
baseLine = Color.Transparent;
|
||||
iconColor = Theme.TextLight;
|
||||
baseFill = Theme.Text.WithAlpha( 0.01f );
|
||||
baseLine = Theme.Text.WithAlpha( 0.1f );
|
||||
iconColor = Theme.Text.WithAlpha( 0.1f );
|
||||
}
|
||||
|
||||
if ( _isValidDropHover )
|
||||
|
||||
Reference in New Issue
Block a user