Skip to content

Commit

Permalink
Frontend: Improve mouse interaction for player widget
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinSRG committed Feb 10, 2024
1 parent 7386693 commit c3b4aca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/player/ResizableWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@dblclick="stopPropagationEvent"
@mousedown="propagateClick"
@touchstart="propagateTouch"
@contextmenu="stopPropagationEvent"
:style="{
top: y + 'px',
left: x + 'px',
Expand Down Expand Up @@ -36,7 +37,7 @@
</div>
</div>

<div class="resizable-widget-body">
<div class="resizable-widget-body" :class="{ resizing: resizing }">
<slot></slot>
</div>

Expand Down
7 changes: 7 additions & 0 deletions frontend/src/style/player/resizable-widget.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
flex-direction: column;
border: solid 1px var(--theme-border-color);
pointer-events: all;
cursor: default;
}

.resizable-widget-header {
Expand All @@ -38,6 +39,7 @@
text-overflow: ellipsis;
overflow: hidden;
padding-right: 12px;
user-select: none;
}

.resizable-widget-body {
Expand All @@ -46,6 +48,11 @@
scrollbar-gutter: stable;

height: calc(100% - 56px);
user-select: text;
}

.resizable-widget-body.resizing {
user-select: none;
}

/* Close button */
Expand Down

0 comments on commit c3b4aca

Please sign in to comment.