From 5aa97b51db75e68264be25a506e96515009f37ec Mon Sep 17 00:00:00 2001 From: Nathaniel Schmitz Date: Fri, 17 Jan 2025 16:34:09 -0500 Subject: [PATCH 1/2] Minor UI tweaks --- js/basemap_selector.ts | 4 ++-- js/container.ts | 16 ++++++++++++++-- js/layer_manager.ts | 2 +- js/search_bar.ts | 1 - js/styles.ts | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/js/basemap_selector.ts b/js/basemap_selector.ts index 50c9fe593d..3a777bebce 100644 --- a/js/basemap_selector.ts +++ b/js/basemap_selector.ts @@ -29,7 +29,7 @@ export class BasemapSelector extends LitWidget< materialStyles, css` .horizontal-flex { - gap: 4px; + gap: 8px; } .legacy-text { @@ -61,7 +61,7 @@ export class BasemapSelector extends LitWidget< return html`
diff --git a/js/container.ts b/js/container.ts index 3ca33f083c..faea7f9d56 100644 --- a/js/container.ts +++ b/js/container.ts @@ -53,7 +53,7 @@ export class Container extends LitWidget { } .widget-container { - padding: 4px; + padding: 8px 12px 12px 12px; } .hidden { @@ -71,6 +71,10 @@ export class Container extends LitWidget { flex-grow: 1; padding: 0 12px 0 0; } + + .left-padding { + padding-left: 8px; + } `, ]; @@ -135,7 +139,15 @@ export class Container extends LitWidget { } private renderTitle(): HTMLTemplateResult { - return html`${this.title}`; + return html`${this.title}`; } private onCloseButtonClicked(): void { diff --git a/js/layer_manager.ts b/js/layer_manager.ts index db9e0eb45f..f93a39ea4c 100644 --- a/js/layer_manager.ts +++ b/js/layer_manager.ts @@ -35,7 +35,7 @@ export class LayerManager extends LitWidget { .layer-manager-rows { display: flex; flex-direction: column; - gap: 4px; + gap: 8px; } `, ]; diff --git a/js/search_bar.ts b/js/search_bar.ts index 7edffffae7..0d920ccbb8 100644 --- a/js/search_bar.ts +++ b/js/search_bar.ts @@ -44,7 +44,6 @@ export class SearchBar extends LitWidget< .input-container { max-width: 460px; - padding: 5px; } .input-container > p { diff --git a/js/styles.ts b/js/styles.ts index d3e190afea..486c2b8de9 100644 --- a/js/styles.ts +++ b/js/styles.ts @@ -29,7 +29,7 @@ export const flexStyles = css` .vertical-flex { display: flex; flex-direction: column; - gap: 4px; + gap: 8px; } .horizontal-flex { From 49498baf337f7d6574470e8c8bdb1827f272066c Mon Sep 17 00:00:00 2001 From: Nathaniel Schmitz Date: Sat, 25 Jan 2025 17:04:15 -0500 Subject: [PATCH 2/2] Additional UI tweaks --- geemap/map_widgets.py | 1 - geemap/toolbar.py | 1 - js/container.ts | 10 +++++++++- js/inspector.ts | 2 +- js/layer_manager_row.ts | 14 +++++++------- js/search_bar.ts | 6 ++++-- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/geemap/map_widgets.py b/geemap/map_widgets.py index 01838352e5..57dd16fe3b 100644 --- a/geemap/map_widgets.py +++ b/geemap/map_widgets.py @@ -781,7 +781,6 @@ def _delete_layer(self) -> None: self.host_map.remove_layer(self.layer) -@Theme.apply class LayerManager(anywidget.AnyWidget): """A layer manager widget for geemap.""" diff --git a/geemap/toolbar.py b/geemap/toolbar.py index a7d77f778d..fbf8c001e9 100644 --- a/geemap/toolbar.py +++ b/geemap/toolbar.py @@ -86,7 +86,6 @@ def _observe_value(self, change: Dict[str, Any]) -> None: self.active = False -@map_widgets.Theme.apply class Toolbar(anywidget.AnyWidget): """A toolbar that can be added to the map.""" diff --git a/js/container.ts b/js/container.ts index faea7f9d56..8540da62eb 100644 --- a/js/container.ts +++ b/js/container.ts @@ -66,6 +66,13 @@ export class Container extends LitWidget { width: 28px; } + .compact-header-button { + background: transparent; + font-size: 16px; + height: 28px; + width: 28px; + } + .header-text { align-content: center; flex-grow: 1; @@ -179,7 +186,8 @@ export class Container extends LitWidget { return html`
@@ -186,16 +186,16 @@ export class LayerManagerRow extends LitWidget<
Remove layer?
`; diff --git a/js/search_bar.ts b/js/search_bar.ts index 0d920ccbb8..aead72e08f 100644 --- a/js/search_bar.ts +++ b/js/search_bar.ts @@ -40,10 +40,11 @@ export class SearchBar extends LitWidget< css` .row { display: flex; + gap: 6px; } .input-container { - max-width: 460px; + max-width: 320px; } .input-container > p { @@ -52,7 +53,7 @@ export class SearchBar extends LitWidget< } input.search { - margin: 2px; + margin: 2px 2px 8px 2px; width: calc(100% - 4px); } @@ -66,6 +67,7 @@ export class SearchBar extends LitWidget< label.result { align-items: center; display: flex; + margin-bottom: 4px; } .import-button, .reset-button {