Skip to content

Commit

Permalink
additional performance tweaks
Browse files Browse the repository at this point in the history
- removed all transparent images and replaced them with argb colors
instead
- added new groupbox to support transparency on windows xp (hopefully)
- label backgrounds now match their parents background color
  • Loading branch information
splintermind committed Dec 23, 2013
1 parent ea9c163 commit 757aef8
Show file tree
Hide file tree
Showing 15 changed files with 2,386 additions and 4,244 deletions.
Binary file modified Masterwork Dwarf Fortress.exe
Binary file not shown.
Binary file modified MasterworkDwarfFortress/System.Windows.Forms.Ribbon35.dll
Binary file not shown.
4,580 changes: 2,163 additions & 2,417 deletions Settings Source/MainForm.Designer.vb

Large diffs are not rendered by default.

1,675 changes: 1 addition & 1,674 deletions Settings Source/MainForm.resx

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Settings Source/Masterwork Dwarf Fortress.vbproj
Expand Up @@ -133,6 +133,12 @@
<Compile Include="custom controls\mwCivLabel.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="custom controls\mwGroupBox.Designer.vb">
<DependentUpon>mwGroupBox.vb</DependentUpon>
</Compile>
<Compile Include="custom controls\mwGroupBox.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="custom controls\mwTableLayout.Designer.vb">
<DependentUpon>mwTableLayout.vb</DependentUpon>
</Compile>
Expand Down
Expand Up @@ -21,11 +21,11 @@ public class RibbonProfesionalRendererColorTableNormal
: RibbonProfesionalRendererColorTable
{

string highlight = "#335463";
string m_highlight = "#335463";
string m_backgroundColor = "#000000";
string lightGray = "#D0D0D0";
string medGray = "#757575";
string textColor = "#F8F8F2";
string m_lightGray = "#D0D0D0";
string m_medGray = "#757575";
string m_textColor = "#F8F8F2";

public RibbonProfesionalRendererColorTableNormal()
{
Expand All @@ -36,7 +36,7 @@ public RibbonProfesionalRendererColorTableNormal()
ThemeDateCreated = "";

OrbDropDownDarkBorder = FromHex(m_backgroundColor);
OrbDropDownLightBorder = FromHex(textColor);
OrbDropDownLightBorder = FromHex(m_textColor);
OrbDropDownBack = FromHex(m_backgroundColor);
OrbDropDownNorthA = FromHex(m_backgroundColor);
OrbDropDownNorthB = FromHex(m_backgroundColor);
Expand All @@ -46,143 +46,143 @@ public RibbonProfesionalRendererColorTableNormal()
OrbDropDownSouthD = FromHex(m_backgroundColor);
OrbDropDownContentbg = FromHex(m_backgroundColor);
OrbDropDownContentbglight = FromHex(m_backgroundColor);
OrbDropDownSeparatorlight = FromHex(textColor);
OrbDropDownSeparatorlight = FromHex(m_textColor);
OrbDropDownSeparatordark = FromHex(m_backgroundColor);
Caption1 = FromHex(textColor);
Caption2 = FromHex(textColor);
Caption3 = FromHex(textColor);
Caption4 = FromHex(textColor);
Caption5 = FromHex(textColor);
Caption6 = FromHex(textColor);
Caption7 = FromHex(textColor);
Caption1 = FromHex(m_textColor);
Caption2 = FromHex(m_textColor);
Caption3 = FromHex(m_textColor);
Caption4 = FromHex(m_textColor);
Caption5 = FromHex(m_textColor);
Caption6 = FromHex(m_textColor);
Caption7 = FromHex(m_textColor);
QuickAccessBorderDark = FromHex(m_backgroundColor);
QuickAccessBorderLight = FromHex(lightGray);
QuickAccessUpper = FromHex(medGray);
QuickAccessLower = FromHex(medGray);
OrbOptionBorder = FromHex(lightGray);
OrbOptionBackground = FromHex(medGray);
OrbOptionShine = FromHex(medGray);
Arrow = FromHex(medGray);
ArrowLight = FromHex(lightGray);
QuickAccessBorderLight = FromHex(m_lightGray);
QuickAccessUpper = FromHex(m_medGray);
QuickAccessLower = FromHex(m_medGray);
OrbOptionBorder = FromHex(m_lightGray);
OrbOptionBackground = FromHex(m_medGray);
OrbOptionShine = FromHex(m_medGray);
Arrow = FromHex(m_medGray);
ArrowLight = FromHex(m_lightGray);
ArrowDisabled = FromHex("#B7B7B7");
Text = FromHex(textColor);
Text = FromHex(m_textColor);
RibbonBackground = FromHex(m_backgroundColor);
TabBorder = FromHex(textColor);
TabBorder = FromHex(m_textColor);

TabNorth = FromHex(highlight);
TabSouth = FromHex(highlight);
TabGlow = FromHex(highlight);
TabText = FromHex(textColor);
TabNorth = FromHex(m_highlight);
TabSouth = FromHex(m_highlight);
TabGlow = FromHex(m_highlight);
TabText = FromHex(m_textColor);

TabActiveText = FromHex(m_backgroundColor);
TabContentNorth = FromHex(medGray);
TabContentNorth = FromHex(m_medGray);
TabContentSouth = FromHex("#B7B7B7");
TabSelectedGlow = FromHex(highlight);
PanelDarkBorder = FromHex(medGray);
PanelLightBorder = FromHex(lightGray);
TabSelectedGlow = FromHex(m_highlight);
PanelDarkBorder = FromHex(m_medGray);
PanelLightBorder = FromHex(m_lightGray);
PanelTextBackground = FromHex(m_backgroundColor);
PanelTextBackgroundSelected = FromHex(medGray);
PanelText = FromHex(textColor);
PanelBackgroundSelected = FromHex(medGray);
PanelOverflowBackground = FromHex(highlight);
PanelOverflowBackgroundPressed = FromHex(highlight);
PanelOverflowBackgroundSelectedNorth = FromHex(medGray);
PanelOverflowBackgroundSelectedSouth = FromHex(medGray);

ButtonBgOut = FromHex(medGray);
PanelTextBackgroundSelected = FromHex(m_medGray);
PanelText = FromHex(m_textColor);
PanelBackgroundSelected = FromHex(m_medGray);
PanelOverflowBackground = FromHex(m_highlight);
PanelOverflowBackgroundPressed = FromHex(m_highlight);
PanelOverflowBackgroundSelectedNorth = FromHex(m_medGray);
PanelOverflowBackgroundSelectedSouth = FromHex(m_medGray);

ButtonBgOut = FromHex(m_medGray);
ButtonBgCenter = FromHex(m_backgroundColor);
ButtonBorderOut = FromHex(lightGray);
ButtonBorderIn = FromHex(medGray);
ButtonGlossyNorth = FromHex(lightGray);
ButtonGlossySouth = FromHex(medGray);

ButtonDisabledBgOut = FromHex(medGray);
ButtonDisabledBgCenter = FromHex(medGray);
ButtonDisabledBorderOut = FromHex(lightGray);
ButtonDisabledBorderIn = FromHex(medGray);
ButtonDisabledGlossyNorth = FromHex(lightGray);
ButtonDisabledGlossySouth = FromHex(lightGray);

ButtonSelectedBgOut = FromHex(medGray);
ButtonBorderOut = FromHex(m_lightGray);
ButtonBorderIn = FromHex(m_medGray);
ButtonGlossyNorth = FromHex(m_lightGray);
ButtonGlossySouth = FromHex(m_medGray);

ButtonDisabledBgOut = FromHex(m_medGray);
ButtonDisabledBgCenter = FromHex(m_medGray);
ButtonDisabledBorderOut = FromHex(m_lightGray);
ButtonDisabledBorderIn = FromHex(m_medGray);
ButtonDisabledGlossyNorth = FromHex(m_lightGray);
ButtonDisabledGlossySouth = FromHex(m_lightGray);

ButtonSelectedBgOut = FromHex(m_medGray);
ButtonSelectedBgCenter = FromHex(m_backgroundColor);
ButtonSelectedBorderOut = FromHex(medGray);
ButtonSelectedBorderIn = FromHex(medGray);
ButtonSelectedGlossyNorth = FromHex(lightGray);
ButtonSelectedGlossySouth = FromHex(medGray);
ButtonSelectedBorderOut = FromHex(m_medGray);
ButtonSelectedBorderIn = FromHex(m_medGray);
ButtonSelectedGlossyNorth = FromHex(m_lightGray);
ButtonSelectedGlossySouth = FromHex(m_medGray);

ButtonPressedBgOut = FromHex(medGray);
ButtonPressedBgOut = FromHex(m_medGray);
ButtonPressedBgCenter = FromHex(m_backgroundColor);
ButtonPressedBorderOut = FromHex(lightGray);
ButtonPressedBorderIn = FromHex(medGray);
ButtonPressedGlossyNorth = FromHex(lightGray);
ButtonPressedGlossySouth = FromHex(medGray);
ButtonPressedBorderOut = FromHex(m_lightGray);
ButtonPressedBorderIn = FromHex(m_medGray);
ButtonPressedGlossyNorth = FromHex(m_lightGray);
ButtonPressedGlossySouth = FromHex(m_medGray);

ButtonCheckedBgOut = FromHex(medGray);
ButtonCheckedBgOut = FromHex(m_medGray);
ButtonCheckedBgCenter = FromHex(m_backgroundColor);
ButtonCheckedBorderOut = FromHex(lightGray);
ButtonCheckedBorderIn = FromHex(medGray);
ButtonCheckedGlossyNorth = FromHex(lightGray);
ButtonCheckedGlossySouth = FromHex(medGray);

ItemGroupOuterBorder = FromHex(lightGray);
ItemGroupInnerBorder = FromHex(medGray);
ItemGroupSeparatorLight = FromHex(lightGray);
ItemGroupSeparatorDark = FromHex(medGray);
ButtonCheckedBorderOut = FromHex(m_lightGray);
ButtonCheckedBorderIn = FromHex(m_medGray);
ButtonCheckedGlossyNorth = FromHex(m_lightGray);
ButtonCheckedGlossySouth = FromHex(m_medGray);

ItemGroupOuterBorder = FromHex(m_lightGray);
ItemGroupInnerBorder = FromHex(m_medGray);
ItemGroupSeparatorLight = FromHex(m_lightGray);
ItemGroupSeparatorDark = FromHex(m_medGray);
ItemGroupBgNorth = FromHex(m_backgroundColor);
ItemGroupBgSouth = FromHex(m_backgroundColor);
ItemGroupBgGlossy = FromHex(medGray);
ButtonListBorder = FromHex(lightGray);
ItemGroupBgGlossy = FromHex(m_medGray);
ButtonListBorder = FromHex(m_lightGray);
ButtonListBg = FromHex(m_backgroundColor);
ButtonListBgSelected = FromHex(lightGray);
DropDownBg = FromHex(m_backgroundColor);
ButtonListBgSelected = FromHex(m_lightGray);
DropDownBg = FromHex(m_highlight);
DropDownImageBg = FromHex(m_backgroundColor);
DropDownImageSeparator = FromHex(lightGray);
DropDownBorder = FromHex(lightGray);
DropDownGripNorth = FromHex(lightGray);
DropDownGripSouth = FromHex(lightGray);
DropDownGripBorder = FromHex(medGray);
DropDownImageSeparator = FromHex(m_lightGray);
DropDownBorder = FromHex(m_lightGray);
DropDownGripNorth = FromHex(m_lightGray);
DropDownGripSouth = FromHex(m_lightGray);
DropDownGripBorder = FromHex(m_medGray);
DropDownGripDark = FromHex(m_backgroundColor);
DropDownGripLight = FromHex(textColor);
SeparatorLight = FromHex(lightGray);
SeparatorDark = FromHex(medGray);
DropDownGripLight = FromHex(m_textColor);
SeparatorLight = FromHex(m_lightGray);
SeparatorDark = FromHex(m_medGray);
SeparatorBg = FromHex(m_backgroundColor);
SeparatorLine = FromHex(medGray);
TextBoxUnselectedBg = FromHex(medGray);
TextBoxBorder = FromHex(lightGray);
ToolTipContentNorth = FromHex(medGray);
SeparatorLine = FromHex(m_medGray);
TextBoxUnselectedBg = FromHex(m_medGray);
TextBoxBorder = FromHex(m_lightGray);
ToolTipContentNorth = FromHex(m_medGray);
ToolTipContentSouth = FromHex(m_backgroundColor);
ToolTipDarkBorder = FromHex(medGray);
ToolTipLightBorder = FromHex(lightGray);
ToolTipDarkBorder = FromHex(m_medGray);
ToolTipLightBorder = FromHex(m_lightGray);
ToolStripItemTextPressed = FromHex(m_backgroundColor);
ToolStripItemTextSelected = FromHex(m_backgroundColor);
ToolStripItemText = FromHex(m_backgroundColor);
clrVerBG_Shadow = FromHex("#FFFFFF");

ButtonPressed_2013 = FromHex(highlight);
ButtonSelected_2013 = FromHex(highlight);
ButtonPressed_2013 = FromHex(m_highlight);
ButtonSelected_2013 = FromHex(m_highlight);

OrbButton_2013 = FromHex(highlight);
OrbButtonSelected_2013 = FromHex(highlight);
OrbButtonPressed_2013 = FromHex(highlight);
OrbButton_2013 = FromHex(m_highlight);
OrbButtonSelected_2013 = FromHex(m_highlight);
OrbButtonPressed_2013 = FromHex(m_highlight);

TabText_2013 = FromHex(textColor);
TabTextSelected_2013 = FromHex(textColor);
TabText_2013 = FromHex(m_textColor);
TabTextSelected_2013 = FromHex(m_textColor);

PanelBorder_2013 = FromHex(medGray);
PanelBorder_2013 = FromHex(m_medGray);
RibbonBackground_2013 = FromHex(m_backgroundColor);
TabCompleteBackground_2013 = FromHex(m_backgroundColor);
TabNormalBackground_2013 = FromHex(m_backgroundColor);
TabActiveBackground_2013 = FromHex(highlight);
TabBorder_2013 = FromHex(medGray);
TabCompleteBorder_2013 = FromHex(medGray);
TabActiveBorder_2013 = FromHex(highlight);
TabActiveBackground_2013 = FromHex(m_highlight);
TabBorder_2013 = FromHex(m_medGray);
TabCompleteBorder_2013 = FromHex(m_medGray);
TabActiveBorder_2013 = FromHex(m_highlight);
OrbButtonText_2013 = FromHex(m_backgroundColor);
PanelText_2013 = FromHex(textColor);
RibbonItemText_2013 = FromHex(textColor);
ToolTipText_2013 = FromHex(textColor);
ToolStripItemTextPressed_2013 = FromHex(medGray);
ToolStripItemTextSelected_2013 = FromHex(medGray);
ToolStripItemText_2013 = FromHex(textColor);
PanelText_2013 = FromHex(m_textColor);
RibbonItemText_2013 = FromHex(m_textColor);
ToolTipText_2013 = FromHex(m_textColor);
ToolStripItemTextPressed_2013 = FromHex(m_medGray);
ToolStripItemTextSelected_2013 = FromHex(m_medGray);
ToolStripItemText_2013 = FromHex(m_textColor);
}

}
Expand Down
Expand Up @@ -2126,7 +2126,7 @@ protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
//if (!someTabHitted)
// SetSelectedTab(null);

////Clear the orb highlight
////Clear the orb m_highlight
//if (OrbSelected && !OrbBounds.Contains(e.Location))
//{
// OrbSelected = false;
Expand Down
Expand Up @@ -265,7 +265,7 @@ private void DropDown_Closed(object sender, EventArgs e)
{
_DropDownVisible = false;

//Steve - when popup closed, un-highlight the dropdown arrow and redraw
//Steve - when popup closed, un-m_highlight the dropdown arrow and redraw
_dropDownPressed = false;
//Kevin - Unselect it as well
_dropDownSelected = false;
Expand Down
16 changes: 9 additions & 7 deletions Settings Source/custom controls/mwCheckBox.vb
Expand Up @@ -30,18 +30,20 @@

Public Sub applyTheme() Implements iTheme.applyTheme
If Theme.ThemeColor = RibbonTheme.Normal Then
Me.BackgroundImage = My.Resources.transp_1
Me.BackgroundImageLayout = ImageLayout.Tile
'Me.BackgroundImage = My.Resources.transp_1
'Me.BackgroundImageLayout = ImageLayout.Tile

Me.BackColor = Color.Transparent
Me.FlatAppearance.CheckedBackColor = Color.Transparent
'Me.BackColor = Color.Transparent
'Me.FlatAppearance.CheckedBackColor = Color.Transparent
Me.BackColor = Drawing.Color.FromArgb(130, 0, 0, 0)
Me.FlatAppearance.CheckedBackColor = Drawing.Color.FromArgb(130, 0, 0, 0)

Me.FlatAppearance.MouseOverBackColor = Theme.ColorTable.TabSelectedGlow
Me.FlatAppearance.MouseDownBackColor = Theme.ColorTable.TabSelectedGlow
Else
'Me.FlatStyle = Windows.Forms.FlatStyle.Standard
Me.BackgroundImageLayout = ImageLayout.None
Me.BackgroundImage = Nothing
'Me.BackgroundImageLayout = ImageLayout.None
'Me.BackgroundImage = Nothing

Me.BackColor = Theme.ColorTable.RibbonBackground_2013
Me.FlatAppearance.CheckedBackColor = Theme.ColorTable.RibbonBackground_2013
Expand All @@ -51,7 +53,7 @@
End If

Me.FlatAppearance.BorderSize = 0
Me.ForeColor = Theme.ColorTable.Text
Me.ForeColor = Theme.ColorTable.Text
End Sub

Protected Function yesNoToBoolean(ByVal value As String) As Boolean
Expand Down
2 changes: 1 addition & 1 deletion Settings Source/custom controls/mwComboBox.vb
Expand Up @@ -13,7 +13,7 @@
End Sub

Public Sub applyTheme() Implements iTheme.applyTheme
Me.BackColor = Theme.ColorTable.RibbonBackground_2013 'ButtonPressed_2013
Me.BackColor = Theme.ColorTable.DropDownBg
Me.ForeColor = Theme.ColorTable.Text
End Sub

Expand Down
28 changes: 28 additions & 0 deletions Settings Source/custom controls/mwGroupBox.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 757aef8

Please sign in to comment.