Skip to content

Commit 96adb79

Browse files
committed
move the toolbar to the titlebar
1 parent c72eb9d commit 96adb79

File tree

1 file changed

+15
-23
lines changed

1 file changed

+15
-23
lines changed

src/packages/frontend/frame-editors/frame-tree/title-bar.tsx

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -353,18 +353,17 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
353353
<ButtonGroup
354354
style={{
355355
padding: "3.5px 0 0 0",
356-
background: is_active
357-
? COL_BAR_BACKGROUND
358-
: COL_BAR_BACKGROUND_DARK,
359356
height: button_height(),
360357
float: "right",
361358
}}
362359
key={"control-buttons"}
363360
>
364-
{is_active && !props.is_full ? render_split_row() : undefined}
365-
{is_active && !props.is_full ? render_split_col() : undefined}
366-
{!props.is_only ? render_full() : undefined}
367-
{render_x()}
361+
<span style={is_active ? undefined : { opacity: 0.3 }}>
362+
{!props.is_full ? render_split_row() : undefined}
363+
{!props.is_full ? render_split_col() : undefined}
364+
{!props.is_only ? render_full() : undefined}
365+
{render_x()}
366+
</span>
368367
</ButtonGroup>
369368
</div>
370369
);
@@ -390,8 +389,8 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
390389
props.actions.unset_frame_full();
391390
}}
392391
style={{
393-
color: darkMode ? "orange" : undefined,
394-
background: !darkMode ? "orange" : undefined,
392+
color: darkMode ? "yellowgreen" : undefined,
393+
background: !darkMode ? "yellowgreen" : undefined,
395394
}}
396395
>
397396
<Icon name={"compress"} />
@@ -1069,7 +1068,7 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
10691068
title={label}
10701069
items={children}
10711070
button={false}
1072-
style={{ color: "#333", padding: 0 }}
1071+
style={{ color: "#333", padding: "7.5px 0 0 0" }}
10731072
/>
10741073
);
10751074
} else {
@@ -1080,7 +1079,7 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
10801079
key={key}
10811080
disabled={disabled}
10821081
onClick={onClick}
1083-
style={{ color: "#333", padding: 0 }}
1082+
style={{ color: "#333", padding: "7.5px 0 0 0" }}
10841083
>
10851084
{label}
10861085
</Button>
@@ -1089,6 +1088,9 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
10891088
}
10901089

10911090
function renderButtonBar(popup = false) {
1091+
if (!is_active) {
1092+
return null;
1093+
}
10921094
if (!popup && !editorSettings?.get("extra_button_bar")) {
10931095
return null;
10941096
}
@@ -1103,17 +1105,7 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
11031105
if (v.length == 0) {
11041106
return null;
11051107
}
1106-
return (
1107-
<div
1108-
style={{
1109-
borderBottom: popup ? undefined : "1px solid #ccc",
1110-
background: "#fafafa",
1111-
opacity: is_active ? undefined : 0.3,
1112-
}}
1113-
>
1114-
<div style={{ marginBottom: "-2px", paddingTop: "4px" }}>{v}</div>
1115-
</div>
1116-
);
1108+
return <div style={{ marginTop: "5px" }}>{v}</div>;
11171109
}
11181110

11191111
function renderComputeServerDocStatus() {
@@ -1261,9 +1253,9 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
12611253
{renderMainMenusAndButtons()}
12621254
{is_active && renderConnectionStatus()}
12631255
{is_active && allButtonsPopover()}
1256+
{renderButtonBar()}
12641257
{renderFrameControls()}
12651258
</div>
1266-
{renderButtonBar()}
12671259
{renderConfirmBar()}
12681260
{hasTour && props.is_visible && props.tab_is_visible && (
12691261
<TitleBarTour refs={tourRefs} />

0 commit comments

Comments
 (0)