Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor UI tweaks on the core container widgets #2210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/basemap_selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class BasemapSelector extends LitWidget<
materialStyles,
css`
.horizontal-flex {
gap: 4px;
gap: 8px;
}

.legacy-text {
Expand Down Expand Up @@ -61,7 +61,7 @@ export class BasemapSelector extends LitWidget<
return html`
<widget-container
icon="map"
title="Basemap Selector"
title="Basemap"
@close-clicked="${this.onCloseClicked}"
>
<div class="vertical-flex">
Expand Down
16 changes: 14 additions & 2 deletions js/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class Container extends LitWidget<ContainerModel, Container> {
}

.widget-container {
padding: 4px;
padding: 8px 12px 12px 12px;
}

.hidden {
Expand All @@ -71,6 +71,10 @@ export class Container extends LitWidget<ContainerModel, Container> {
flex-grow: 1;
padding: 0 12px 0 0;
}

.left-padding {
padding-left: 8px;
}
`,
];

Expand Down Expand Up @@ -135,7 +139,15 @@ export class Container extends LitWidget<ContainerModel, Container> {
}

private renderTitle(): HTMLTemplateResult {
return html`<span class="legacy-text header-text">${this.title}</span>`;
return html`<span
class="${classMap({
"legacy-text": true,
"header-text": true,
"left-padding":
this.compactMode && this.title && !this.reverseHeader,
})}"
>${this.title}</span
>`;
}

private onCloseButtonClicked(): void {
Expand Down
2 changes: 1 addition & 1 deletion js/layer_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class LayerManager extends LitWidget<LayerManagerModel, LayerManager> {
.layer-manager-rows {
display: flex;
flex-direction: column;
gap: 4px;
gap: 8px;
}
`,
];
Expand Down
1 change: 0 additions & 1 deletion js/search_bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export class SearchBar extends LitWidget<

.input-container {
max-width: 460px;
padding: 5px;
}

.input-container > p {
Expand Down
2 changes: 1 addition & 1 deletion js/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const flexStyles = css`
.vertical-flex {
display: flex;
flex-direction: column;
gap: 4px;
gap: 8px;
}

.horizontal-flex {
Expand Down
Loading