Skip to content

Commit 668f11b

Browse files
committed
feat: more visible collapse/expand pane buttons
1 parent b12fac2 commit 668f11b

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

packages/app-frontend/src/features/layout/SplitPane.vue

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,20 @@ export default defineComponent({
202202
'left-0 right-0 bottom-0 flex-col': orientation === 'portrait',
203203
}"
204204
>
205-
<VueButton
206-
:icon-left="orientation === 'landscape' ? 'arrow_left': 'arrow_drop_up'"
207-
class="block icon-button flat pointer-events-auto opacity-40 hover:opacity-100"
205+
<button
206+
v-tooltip="rightCollapsed ? `Expand ${orientation === 'landscape' ? 'Right' : 'Bottom'} pane` : `Collapse ${orientation === 'landscape' ? 'Left' : 'Top'} pane`"
207+
class="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 flex items-center justify-center w-2.5 h-6 rounded overflow-hidden pointer-events-auto opacity-70 hover:opacity-100"
208+
:class="{
209+
'rounded-r-none border-r-0': orientation === 'landscape',
210+
'rounded-b-none border-b-0': orientation === 'portrait',
211+
}"
208212
@click="collapseLeft()"
209-
/>
213+
>
214+
<VueIcon
215+
:icon="orientation === 'landscape' ? 'arrow_left': 'arrow_drop_up'"
216+
class="flex-none w-5 h-5"
217+
/>
218+
</button>
210219
</div>
211220
</div>
212221
<div
@@ -225,11 +234,20 @@ export default defineComponent({
225234
'left-0 right-0 top-0 flex-col': orientation === 'portrait',
226235
}"
227236
>
228-
<VueButton
229-
:icon-left="orientation === 'landscape' ? 'arrow_right': 'arrow_drop_down'"
230-
class="block icon-button flat pointer-events-auto opacity-40 hover:opacity-100"
237+
<button
238+
v-tooltip="leftCollapsed ? `Expand ${orientation === 'landscape' ? 'Left' : 'Top'} pane` : `Collapse ${orientation === 'landscape' ? 'Right' : 'Bottom'} pane`"
239+
class="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 flex items-center justify-center w-2.5 h-6 rounded overflow-hidden pointer-events-auto opacity-70 hover:opacity-100"
240+
:class="{
241+
'rounded-l-none border-l-0': orientation === 'landscape',
242+
'rounded-t-none border-t-0': orientation === 'portrait',
243+
}"
231244
@click="collapseRight()"
232-
/>
245+
>
246+
<VueIcon
247+
:icon="orientation === 'landscape' ? 'arrow_right': 'arrow_drop_down'"
248+
class="flex-none w-5 h-5"
249+
/>
250+
</button>
233251
</div>
234252

235253
<slot
@@ -282,11 +300,9 @@ export default defineComponent({
282300
}
283301
284302
.collapse-btn {
285-
.icon-button {
286-
@apply w-2.5 h-6 rounded-sm !important;
287-
303+
button {
288304
.portrait & {
289-
@apply w-6 h-2.5 !important;
305+
@apply w-6 h-2.5;
290306
}
291307
}
292308
}

0 commit comments

Comments
 (0)