Skip to content

Commit

Permalink
theme-neo-light: splitter styling #5848
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiu committed Sep 1, 2024
1 parent 1c3d4cf commit 089d8a4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 32 deletions.
11 changes: 10 additions & 1 deletion resources/scss/src/component/Splitter.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.neo-splitter {
background-color: var(--splitter-background-color);
border : var(--splitter-border);
border-radius : var(--splitter-border-radius);
transition : background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;

&:hover {
&:active, &:hover {
background-color: var(--splitter-hover-color);
border-color : var(--splitter-hover-color);
}
Expand All @@ -12,18 +13,26 @@
border-left : none;
border-right: none;
cursor : ns-resize;
margin : var(--splitter-margin-horizontal);
}

&.neo-vertical {
border-bottom: none;
border-top : none;
cursor : ew-resize;
margin : var(--splitter-margin-vertical);
}
}

.neo-dragproxy {
&.neo-splitter {
background-color: var(--splitter-hover-color);
border-color : var(--splitter-hover-color);

&.neo-horizontal, &.neo-vertical {
// getBoundingClientRect() already adds margins to positions,
// so it would get added twice unless we nullify it.
margin: 0;
}
}
}
9 changes: 6 additions & 3 deletions resources/scss/theme-dark/component/Splitter.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
:root .neo-theme-dark { // .neo-splitter
--splitter-background-color: #3c3f41;
--splitter-border : 1px solid #323232;
--splitter-hover-color : #64B5F6;
--splitter-background-color : #3c3f41;
--splitter-border : 1px solid #323232;
--splitter-border-radius : 0;
--splitter-hover-color : #64B5F6;
--splitter-margin-horizontal: 0;
--splitter-margin-vertical : 0;
}
9 changes: 6 additions & 3 deletions resources/scss/theme-light/component/Splitter.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
:root .neo-theme-light { // .neo-splitter
--splitter-background-color: #f2f2f2;
--splitter-border : 1px solid #ddd;
--splitter-hover-color : #5d83a7
--splitter-background-color : #f2f2f2;
--splitter-border : 1px solid #ddd;
--splitter-border-radius : 0;
--splitter-hover-color : #5d83a7;
--splitter-margin-horizontal: 0;
--splitter-margin-vertical : 0;
}
26 changes: 6 additions & 20 deletions resources/scss/theme-neo-light/component/Splitter.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
:root .neo-theme-neo-light { // .neo-splitter
--splitter-background-color: #f2f2f2;
--splitter-border : 1px solid #ddd;
--splitter-hover-color : #5d83a7;

.neo-splitter {
opacity: 1;
margin: 8px 2px;
border-radius: 100px;
border: unset !important;

&:hover, &:active {
background-color: #5595F5 !important;
}
}

.neo-dragproxy {
&.neo-splitter {
background-color: #5595F5 !important;
}
}
--splitter-background-color : #f2f2f2;
--splitter-border : none;
--splitter-border-radius : 5px;
--splitter-hover-color : #5595F5;
--splitter-margin-horizontal: 2px 8px;
--splitter-margin-vertical : 8px 2px;
}
11 changes: 6 additions & 5 deletions src/draggable/DragZone.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -305,16 +305,17 @@ class DragZone extends Base {
* @param {Object} data
*/
dragStart(data) {
let me = this,
{owner} = me,
{cls} = owner,
rect = me.getDragElementRect(data),
let me = this,
{appName, owner, windowId} = me,
{cls} = owner,
rect = me.getDragElementRect(data),
offsetX, offsetY;

me.setData();

Neo.main.addon.DragDrop.setConfigs({
appName: me.appName,
appName,
windowId,
...me.getMainThreadConfigs()
});

Expand Down

0 comments on commit 089d8a4

Please sign in to comment.