From a49d225f64b7ac2aad1d0422e5f57e4a543f04d3 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Tue, 29 Dec 2015 16:50:56 -1000 Subject: [PATCH] More accomodating FileBrowser margin --- specter/include/Specter/ViewResources.hpp | 2 +- specter/lib/FileBrowser.cpp | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/specter/include/Specter/ViewResources.hpp b/specter/include/Specter/ViewResources.hpp index ca8909c0a..941b93148 100644 --- a/specter/include/Specter/ViewResources.hpp +++ b/specter/include/Specter/ViewResources.hpp @@ -20,7 +20,7 @@ class ThemeData Zeus::CColor m_vpBg = {0.2, 0.2, 0.2, 1.0}; Zeus::CColor m_tbBg = {0.4, 0.4, 0.4, 1.0}; Zeus::CColor m_tooltipBg = {0.0, 0.0, 0.0, 0.65}; - Zeus::CColor m_splashBg = {0.1, 0.1, 0.1, 0.65}; + Zeus::CColor m_splashBg = {0.075, 0.075, 0.075, 0.85}; Zeus::CColor m_splash1 = {1.0, 1.0, 1.0, 1.0}; Zeus::CColor m_splash2 = {0.3, 0.3, 0.3, 1.0}; diff --git a/specter/lib/FileBrowser.cpp b/specter/lib/FileBrowser.cpp index 479e09129..5b2b752bf 100644 --- a/specter/lib/FileBrowser.cpp +++ b/specter/lib/FileBrowser.cpp @@ -4,7 +4,7 @@ namespace Specter { -#define BROWSER_MARGIN 30 +#define BROWSER_MARGIN 8 #define BROWSER_MIN_WIDTH 600 #define BROWSER_MIN_HEIGHT 300 @@ -194,8 +194,8 @@ void FileBrowser::RightSide::resized(const boo::SWindowRect& root, const boo::SW float pf = rootView().viewRes().pixelFactor(); boo::SWindowRect pathRect = sub; - pathRect.location[0] += 25 * pf; - pathRect.location[1] += pathRect.size[1] - 50 * pf; + pathRect.location[0] += BROWSER_MARGIN * pf; + pathRect.location[1] += pathRect.size[1] - (BROWSER_MARGIN + 20) * pf; for (PathButton& b : m_fb.m_pathButtons) { pathRect.size[0] = b.m_button.m_view->nominalWidth(); @@ -204,22 +204,22 @@ void FileBrowser::RightSide::resized(const boo::SWindowRect& root, const boo::SW pathRect.location[0] += pathRect.size[0] + 2; } - pathRect.location[0] = sub.location[0] + 25 * pf; + pathRect.location[0] = sub.location[0] + BROWSER_MARGIN * pf; pathRect.location[1] -= 25 * pf; - pathRect.size[0] = sub.size[0] - 155 * pf; + pathRect.size[0] = sub.size[0] - m_fb.m_ok.m_button.m_view->nominalWidth() - 20 * pf; pathRect.size[1] = m_fb.m_fileField.m_view->nominalHeight(); m_fb.m_fileField.m_view->resized(root, pathRect); - pathRect.location[1] = sub.location[1] + 25 * pf; - pathRect.size[0] = sub.size[0] - 50 * pf; - pathRect.size[1] = sub.size[1] - 105 * pf; + pathRect.location[1] = sub.location[1] + BROWSER_MARGIN * pf; + pathRect.size[0] = sub.size[0] - BROWSER_MARGIN * 2 * pf; + pathRect.size[1] = sub.size[1] - (BROWSER_MARGIN + 56) * pf; m_fb.m_fileListing.m_view->resized(root, pathRect); boo::SWindowRect buttonRect = sub; buttonRect.size[0] = m_fb.m_ok.m_button.m_view->nominalWidth(); buttonRect.size[1] = m_fb.m_ok.m_button.m_view->nominalHeight(); - buttonRect.location[0] += sub.size[0] - 25 * pf - buttonRect.size[0]; - buttonRect.location[1] += sub.size[1] - 50 * pf; + buttonRect.location[0] += sub.size[0] - BROWSER_MARGIN * pf - buttonRect.size[0]; + buttonRect.location[1] += sub.size[1] - (BROWSER_MARGIN + 20) * pf; m_fb.m_ok.m_button.m_view->resized(root, buttonRect); buttonRect.location[1] -= 25 * pf; m_fb.m_cancel.m_button.m_view->resized(root, buttonRect);