From 1cc1d8ed35ee45bf313c90fcba531322f4e4fb06 Mon Sep 17 00:00:00 2001 From: undergroundwires Date: Tue, 14 Sep 2021 20:12:31 +0200 Subject: [PATCH] Improve alignment, padding/margin issues on UI It centers center script menu text vertically. The menu on top (including selector, view and OS changer) was looking bad without utilizing the empty space on smaller screens when of those menu items overflowed to a new line. It adds vertical margin between slider items on vertical view. It also refactors slider component so that the v-deep is no longer used, instead style is set through properties. It also ensures symmetrical margin on both sides of the handle in slider during horizontal view. Before left margin did not exist and right margin was too wide. This commit balances right and left margin of the arrow. It changes the way margining is done for for card list. It removes internal margin from card list. Because when cards have margins, they also add that margin to the outer card list. This commit solves in a way that unifies styling margins of the outer card list globally from same place. It styles the container of card list instead, this way same margins and padding is also applied to non-card view (e.g. scripts tree). But if card list was styled separately with internal margins as before then those different views look different. It fixes card margin variables not being used. Finally it adds margin on top selectors on small screens. --- .../Scripts/Menu/TheScriptsMenu.vue | 33 ++++++++------- .../components/Scripts/Slider/Handle.vue | 5 ++- .../Scripts/Slider/HorizontalResizeSlider.vue | 40 +++++++++++++------ .../components/Scripts/TheScriptArea.vue | 15 +++---- .../Scripts/View/Cards/CardList.vue | 3 ++ .../Scripts/View/Cards/CardListItem.vue | 4 +- src/presentation/styles/components/card.scss | 1 + 7 files changed, 60 insertions(+), 41 deletions(-) create mode 100644 src/presentation/styles/components/card.scss diff --git a/src/presentation/components/Scripts/Menu/TheScriptsMenu.vue b/src/presentation/components/Scripts/Menu/TheScriptsMenu.vue index b66026ec4..25fc669e2 100644 --- a/src/presentation/components/Scripts/Menu/TheScriptsMenu.vue +++ b/src/presentation/components/Scripts/Menu/TheScriptsMenu.vue @@ -57,21 +57,24 @@ export default class TheScriptsMenu extends StatefulVue { diff --git a/src/presentation/components/Scripts/Slider/Handle.vue b/src/presentation/components/Scripts/Slider/Handle.vue index 098e63c44..3236c53f3 100644 --- a/src/presentation/components/Scripts/Slider/Handle.vue +++ b/src/presentation/components/Scripts/Slider/Handle.vue @@ -7,7 +7,7 @@ + />
@@ -66,6 +66,7 @@ export default class Handle extends Vue { .image { color: $dark-gray; } - margin-right: 10px; + margin-right: 5px; + margin-left: 5px; } diff --git a/src/presentation/components/Scripts/Slider/HorizontalResizeSlider.vue b/src/presentation/components/Scripts/Slider/HorizontalResizeSlider.vue index 29abfe961..4892ea6f4 100644 --- a/src/presentation/components/Scripts/Slider/HorizontalResizeSlider.vue +++ b/src/presentation/components/Scripts/Slider/HorizontalResizeSlider.vue @@ -1,17 +1,22 @@