Skip to content

Commit 442c62f

Browse files
committed
Redesign desktop inline widget chrome
1 parent f0f3751 commit 442c62f

1 file changed

Lines changed: 50 additions & 2 deletions

File tree

crates/jcode-desktop/src/single_session_render.rs

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,26 @@ fn push_single_session_inline_widget_card(
808808
};
809809

810810
if app.active_inline_widget_uses_card_chrome() {
811-
const INLINE_CARD_BACKGROUND_COLOR: [f32; 4] = [0.972, 0.982, 1.000, 0.54];
812-
const INLINE_CARD_BORDER_COLOR: [f32; 4] = [0.180, 0.255, 0.430, 0.18];
811+
const INLINE_CARD_SHADOW_COLOR: [f32; 4] = [0.020, 0.035, 0.070, 0.080];
812+
const INLINE_CARD_BACKGROUND_COLOR: [f32; 4] = [0.992, 0.996, 1.000, 0.72];
813+
const INLINE_CARD_BORDER_COLOR: [f32; 4] = [0.105, 0.185, 0.360, 0.20];
814+
const INLINE_CARD_HIGHLIGHT_COLOR: [f32; 4] = [1.000, 1.000, 1.000, 0.52];
815+
const INLINE_CARD_ACCENT_COLOR: [f32; 4] = [0.125, 0.420, 0.920, 0.34];
816+
push_rounded_rect(
817+
vertices,
818+
Rect {
819+
x: layout.card.x + 0.0,
820+
y: layout.card.y + 5.0,
821+
width: layout.card.width,
822+
height: layout.card.height,
823+
},
824+
INLINE_WIDGET_CARD_RADIUS + 2.0,
825+
with_alpha(
826+
INLINE_CARD_SHADOW_COLOR,
827+
INLINE_CARD_SHADOW_COLOR[3] * progress,
828+
),
829+
size,
830+
);
813831
push_rounded_rect(
814832
vertices,
815833
layout.card,
@@ -830,6 +848,36 @@ fn push_single_session_inline_widget_card(
830848
),
831849
size,
832850
);
851+
push_rounded_rect(
852+
vertices,
853+
Rect {
854+
x: layout.card.x + 1.5,
855+
y: layout.card.y + 1.5,
856+
width: 3.0,
857+
height: (layout.card.height - 3.0).max(0.0),
858+
},
859+
2.0,
860+
with_alpha(
861+
INLINE_CARD_ACCENT_COLOR,
862+
INLINE_CARD_ACCENT_COLOR[3] * progress,
863+
),
864+
size,
865+
);
866+
push_rounded_rect(
867+
vertices,
868+
Rect {
869+
x: layout.card.x + 8.0,
870+
y: layout.card.y + 1.5,
871+
width: (layout.card.width - 16.0).max(0.0),
872+
height: 1.0,
873+
},
874+
0.5,
875+
with_alpha(
876+
INLINE_CARD_HIGHLIGHT_COLOR,
877+
INLINE_CARD_HIGHLIGHT_COLOR[3] * progress,
878+
),
879+
size,
880+
);
833881
}
834882

835883
if app.model_picker.open

0 commit comments

Comments
 (0)