Skip to content

Commit

Permalink
styling updates
Browse files Browse the repository at this point in the history
* update styling for mixed state
* move multiselect/advanced toggle into same row as plugin description and add tooltip
* use same icon as in data menu to toggle multiselect
  • Loading branch information
kecnry committed May 25, 2022
1 parent 393b42f commit 6819ecb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
5 changes: 2 additions & 3 deletions jdaviz/components/glue_state_sync_wrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@
margin-left: -24px;
margin-right: -24px;
cursor: pointer;
border: 1px solid rgb(21 58 75);
border-radius: 4px;
border: 2px solid #00617E;
background-color: rgb(245 245 245 / 70%);">
<v-icon
large
dark
color="rgb(21 58 75 / 70%)"
color="#00617E"
style="height: 100%"
>mdi-link-off</v-icon>
</div>
Expand Down
1 change: 1 addition & 0 deletions jdaviz/components/tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const tooltips = {
'table-next': 'Select next row in table',
'table-play-pause-toggle': 'Toggle cycling through rows of table',
'table-play-pause-delay': 'Set delay before cycling to next entry',
'plugin-plot-options-multiselect-toggle': 'Toggle between simple (single-select) and advanced (multiselect)',
'plugin-plot-options-mixed-state': 'Current values are mixed, click to sync at shown value',
'plugin-model-fitting-add-model': 'Create model component',
'plugin-model-fitting-param-fixed': 'Check the box to freeze parameter value',
Expand Down
7 changes: 7 additions & 0 deletions jdaviz/configs/default/plugins/plot_options/plot_options.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import os

from traitlets import Any, Dict, Float, Bool, Int, List, Unicode
from ipywidgets.widgets import widget_serialization

from glue.viewers.profile.state import ProfileViewerState, ProfileLayerState
from glue_jupyter.common.toolbar_vuetify import read_icon

from jdaviz.core.registries import tray_registry
from jdaviz.core.template_mixin import (TemplateMixin, ViewerSelect, LayerSelect,
PlotOptionsSyncState)
from jdaviz.core.tools import ICON_DIR

__all__ = ['PlotOptions']

Expand Down Expand Up @@ -97,6 +101,9 @@ class PlotOptions(TemplateMixin):
show_axes_value = Bool().tag(sync=True)
show_axes_sync = Dict().tag(sync=True)

icon_radialtocheck = Unicode(read_icon(os.path.join(ICON_DIR, 'radialtocheck.svg'), 'svg+xml')).tag(sync=True) # noqa
icon_checktoradial = Unicode(read_icon(os.path.join(ICON_DIR, 'checktoradial.svg'), 'svg+xml')).tag(sync=True) # noqa

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.viewer = ViewerSelect(self, 'viewer_items', 'viewer_selected', 'multiselect')
Expand Down
24 changes: 14 additions & 10 deletions jdaviz/configs/default/plugins/plot_options/plot_options.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<template>
<j-tray-plugin>
<v-row>
<j-docs-link :link="'https://jdaviz.readthedocs.io/en/'+vdocs+'/'+config+'/plugins.html#plot-options'">Viewer and data/layer options.</j-docs-link>
</v-row>

<v-row justify="end">
<v-btn
icon
@click="() => {multiselect = !multiselect}"
>
<v-icon>{{multiselect ? 'mdi-checkbox-multiple-marked-outline' : 'mdi-checkbox-marked-outline'}}</v-icon>
</v-btn>
<div style="width: calc(100% - 32px)">
<j-docs-link :link="'https://jdaviz.readthedocs.io/en/'+vdocs+'/'+config+'/plugins.html#plot-options'">Viewer and data/layer options.</j-docs-link>
</div>
<div style="width: 32px">
<j-tooltip tipid='plugin-plot-options-multiselect-toggle'>
<v-btn
icon
style="opacity: 0.7"
@click="() => {multiselect = !multiselect}"
>
<img :src="multiselect ? icon_checktoradial : icon_radialtocheck" width="24"/>
</v-btn>
</j-tooltip>
</div>
</v-row>

<plugin-viewer-select
Expand Down

0 comments on commit 6819ecb

Please # to comment.