diff --git a/BeefLibs/Beefy2D/src/theme/dark/DarkComboBox.bf b/BeefLibs/Beefy2D/src/theme/dark/DarkComboBox.bf index aa4052a0..f73c4fb7 100644 --- a/BeefLibs/Beefy2D/src/theme/dark/DarkComboBox.bf +++ b/BeefLibs/Beefy2D/src/theme/dark/DarkComboBox.bf @@ -41,10 +41,17 @@ namespace Beefy.theme.dark } }*/ + public enum FrameKind + { + OnWindow, + Frameless, + Transparent + } + String mLabel ~ delete _; public float mLabelX = GS!(8); public FontAlign mLabelAlign = FontAlign.Centered; - public bool mFrameless = false; + public FrameKind mFrameKind = .OnWindow; public Event> mPopulateMenuAction ~ _.Dispose(); public CBMenuWidget mCurMenuWidget; @@ -96,12 +103,12 @@ namespace Beefy.theme.dark return; } - if (!mFrameless) + if ((mFrameKind == .OnWindow) || (mFrameKind == .Frameless)) { - Image texture = DarkTheme.sDarkTheme.mImages[(int32)DarkTheme.ImageIdx.ComboBox]; - g.DrawBox(texture, 0, -2, mWidth, mHeight); + Image texture = DarkTheme.sDarkTheme.mImages[(mFrameKind == .OnWindow) ? (int32)DarkTheme.ImageIdx.ComboBox : (int32)DarkTheme.ImageIdx.ComboBoxFrameless]; + g.DrawBox(texture, 0, GS!(-2), mWidth, mHeight); } - else + else { if (mBkgColor != 0) { @@ -125,7 +132,7 @@ namespace Beefy.theme.dark float fontHeight = g.mFont.GetHeight(); //g.DrawString(label, mLabelX, (mHeight - GS!(24)) / 2, mLabelAlign, mWidth - mLabelX - GS!(24), FontOverflowMode.Ellipsis); - g.DrawString(label, mLabelX, (mHeight - fontHeight) / 2 - GS!(2) - 1, mLabelAlign, mWidth - mLabelX - GS!(24), FontOverflowMode.Ellipsis); + g.DrawString(label, mLabelX, (mHeight - fontHeight) / 2 - (int)GS!(3.5f), mLabelAlign, mWidth - mLabelX - GS!(24), FontOverflowMode.Ellipsis); } } @@ -134,7 +141,10 @@ namespace Beefy.theme.dark using (g.PushColor(DarkTheme.COLOR_SELECTED_OUTLINE)) g.DrawBox(DarkTheme.sDarkTheme.GetImage(.Outline), GS!(2), 0, mWidth - GS!(4), mHeight - GS!(4)); } - } + } + + /*using (g.PushColor(0x1FFF0000)) + g.FillRect(0, 0, mWidth, mHeight);*/ } public void GetLabel(String label) @@ -184,7 +194,7 @@ namespace Beefy.theme.dark popupXOfs = GS!(2); popupYOfs = GS!(2); } - else if (mFrameless) + else if (mFrameKind == .Transparent) { popupXOfs = GS!(2); popupYOfs = GS!(2); diff --git a/BeefLibs/Beefy2D/src/theme/dark/DarkTabbedView.bf b/BeefLibs/Beefy2D/src/theme/dark/DarkTabbedView.bf index 8a2b5bcd..71fdba85 100644 --- a/BeefLibs/Beefy2D/src/theme/dark/DarkTabbedView.bf +++ b/BeefLibs/Beefy2D/src/theme/dark/DarkTabbedView.bf @@ -481,7 +481,7 @@ namespace Beefy.theme.dark useWidth = Math.Max(mWidth - GS!(36), 0); useWidth = (float)Math.Round(useWidth); - tabButton.Resize(curX, tabButton.mY, useWidth, tabButton.mHeight); + tabButton.Resize(curX, tabButton.mY, useWidth, DarkTheme.sUnitSize); //float offset = tabIdx - leftObscure; float widthSubtract = Math.Max(0, leftObscure); @@ -590,7 +590,7 @@ namespace Beefy.theme.dark mChildWidgets.Insert(0, tabButton); - tabButton.Resize(curX, tabButton.mY, tabButton.mWidth, tabButton.mHeight); + tabButton.Resize(curX, tabButton.mY, tabButton.mWidth, DarkTheme.sUnitSize); curX += showWidth; } diff --git a/BeefLibs/Beefy2D/src/theme/dark/DarkTheme.bf b/BeefLibs/Beefy2D/src/theme/dark/DarkTheme.bf index 86fecab5..930e7cff 100644 --- a/BeefLibs/Beefy2D/src/theme/dark/DarkTheme.bf +++ b/BeefLibs/Beefy2D/src/theme/dark/DarkTheme.bf @@ -181,6 +181,7 @@ namespace Beefy.theme.dark CheckIndeterminate, CodeError, CodeWarning, + ComboBoxFrameless, COUNT }; diff --git a/IDE/dist/images/DarkUI.png b/IDE/dist/images/DarkUI.png index 2ea78676..842ed66e 100644 Binary files a/IDE/dist/images/DarkUI.png and b/IDE/dist/images/DarkUI.png differ diff --git a/IDE/dist/images/DarkUI.psd b/IDE/dist/images/DarkUI.psd index 47e2720f..1fc5d19a 100644 Binary files a/IDE/dist/images/DarkUI.psd and b/IDE/dist/images/DarkUI.psd differ diff --git a/IDE/dist/images/DarkUI_2.png b/IDE/dist/images/DarkUI_2.png index 66a37c0c..016931cc 100644 Binary files a/IDE/dist/images/DarkUI_2.png and b/IDE/dist/images/DarkUI_2.png differ diff --git a/IDE/dist/images/DarkUI_4.png b/IDE/dist/images/DarkUI_4.png index 504b41e2..f5782433 100644 Binary files a/IDE/dist/images/DarkUI_4.png and b/IDE/dist/images/DarkUI_4.png differ diff --git a/IDE/src/ui/PropertiesDialog.bf b/IDE/src/ui/PropertiesDialog.bf index 0d195b0e..b63346a7 100644 --- a/IDE/src/ui/PropertiesDialog.bf +++ b/IDE/src/ui/PropertiesDialog.bf @@ -1877,7 +1877,7 @@ namespace IDE.ui if (propIdx == 0) { var comboBox = new DarkComboBox(); - comboBox.mFrameless = true; + comboBox.mFrameKind = .Transparent; comboBox.mPopulateMenuAction.Add(new (menu) => { PopulateComboBox(menu, propEntries); }); subItem.AddWidget(comboBox); subItem.mOnResized.Add(new (evt) => { comboBox.Resize(0, 0, GetValueEditWidth(subItem), subItem.mHeight + 1); }); diff --git a/IDE/src/ui/StatusBar.bf b/IDE/src/ui/StatusBar.bf index 97936dbf..00054bfe 100644 --- a/IDE/src/ui/StatusBar.bf +++ b/IDE/src/ui/StatusBar.bf @@ -27,11 +27,13 @@ namespace IDE.ui public this() { - mConfigComboBox = new DarkComboBox(); + mConfigComboBox = new DarkComboBox(); + mConfigComboBox.mFrameKind = .Frameless; mConfigComboBox.mPopulateMenuAction.Add(new => PopulateConfigMenu); AddWidget(mConfigComboBox); - mPlatformComboBox = new DarkComboBox(); + mPlatformComboBox = new DarkComboBox(); + mPlatformComboBox.mFrameKind = .Frameless; mPlatformComboBox.mPopulateMenuAction.Add(new => PopulatePlatformMenu); AddWidget(mPlatformComboBox); } @@ -94,8 +96,8 @@ namespace IDE.ui void ResizeComponents() { int btnLeft = gApp.mSettings.mEnableDevMode ? GS!(380) : GS!(300); - mConfigComboBox.Resize(mWidth - btnLeft, 0, GS!(120), mHeight + 2); - mPlatformComboBox.Resize(mWidth - btnLeft - GS!(120), 0, GS!(120), mHeight + 2); + mConfigComboBox.Resize(mWidth - btnLeft, GS!(0), GS!(120), GS!(24)); + mPlatformComboBox.Resize(mWidth - btnLeft - GS!(120), GS!(0), GS!(120), GS!(24)); if (mCancelSymSrvButton != null) mCancelSymSrvButton.Resize(GS!(546), 0, GS!(20), GS!(20)); diff --git a/IDE/src/ui/WorkspaceProperties.bf b/IDE/src/ui/WorkspaceProperties.bf index 3ddfdb89..7f4be782 100644 --- a/IDE/src/ui/WorkspaceProperties.bf +++ b/IDE/src/ui/WorkspaceProperties.bf @@ -634,7 +634,7 @@ namespace IDE.ui configItem = listViewItem.CreateSubItem(1); configItem.Label = configSelection.mConfig; configComboBox = new DarkComboBox(); - configComboBox.mFrameless = true; + configComboBox.mFrameKind = .Transparent; configComboBox.mPopulateMenuAction.Add(new (menu) => { PopulateProjectConfigMenu(menu, configItem, project, newConfigSelection); }); configItem.AddWidget(configComboBox); configItem.mOnResized.Add(new (evt) => { configComboBox.Resize(0, 0, configItem.mWidth, configItem.mHeight + 1); }); @@ -643,7 +643,7 @@ namespace IDE.ui platformItem = listViewItem.CreateSubItem(2); platformItem.Label = configSelection.mPlatform; platformComboBox = new DarkComboBox(); - platformComboBox.mFrameless = true; + platformComboBox.mFrameKind = .Transparent; platformComboBox.mPopulateMenuAction.Add(new (menu) => { PopulateProjectPlatformMenu(menu, platformItem, project, newConfigSelection); }); platformItem.AddWidget(platformComboBox); platformItem.mOnResized.Add(new (evt) => { platformComboBox.Resize(0, 0, GetValueEditWidth(platformItem), platformItem.mHeight + 1); });