Skip to content

Commit 557019e

Browse files
author
Martin Schut
committed
Improve layout of history window
1 parent 51d58b4 commit 557019e

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

src-ocaml/tea_debug.ml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,25 @@ let debug
6868
"box-shadow", "inset 0 0 10px #333";
6969
];
7070
rule "#debug nav" [
71-
"position", "fixed"; "bottom", "0"; "right", "6px";
71+
"position", "fixed"; "max-width", "50%"; "bottom", "0"; "right", "6px";
7272
"border-radius", "4px 4px 0 0"; "background-color", "#444"; "color", "#fff"; "font-family", "monospace";
7373
"box-shadow", "0 0 10px #333";
7474
];
7575
rule "#debug.paused nav" ["height", "50%"; "padding-bottom", "2em"];
76-
rule "#debug nav .toggle" ["padding", "6px"; "cursor", "pointer"; "min-width", "24ch"; "text-align", "center"];
76+
rule "#debug nav .toggle" [
77+
"padding", "6px";
78+
"padding-left", "9px";
79+
"cursor", "pointer";
80+
"min-width", "24ch";
81+
"text-align", "center";
82+
"border-left", "3px solid #333";
83+
"border-radius", "4px 4px 0 0"
84+
];
7785
rule "#debug nav .toggle:before" [
7886
"content", "' '";
7987
"position", "absolute"; "left", "0"; "top", "0";
8088
"width", ".5ch"; "height", "1.8ch";
81-
"margin", ".8ch 1ch";
89+
"margin", "1.2ch";
8290
"border", "solid #fff";
8391
"border-width", "0 .5ch";
8492
];
@@ -93,7 +101,7 @@ let debug
93101
"overflow-y", "auto";
94102
"list-style", "none";
95103
];
96-
rule "#debug nav .history li" ["margin", "0"; "padding", "0.2ch"];
104+
rule "#debug nav .history li" ["margin", "0"; "padding", "0.2ch"; "border-left", "3px solid #333"];
97105
rule "#debug nav .history li.selected" ["background-color", "#333"];
98106
rule "#debug nav .history span.details" [
99107
"display", "inline-block"; "cursor", "pointer";
@@ -102,14 +110,11 @@ let debug
102110
"vertical-align", "super";
103111
];
104112
rule "#debug nav .history li.selected span.details:after" ["content", "'\\2026'"];
105-
rule "#debug nav .history li.selected span.details.show:before" [
106-
"position", "absolute"; "content", "' '";
107-
"border", "solid transparent"; "border-right-color", "#333";
108-
"border-width", "1.6ch"; "margin-left", "-4.4ch"; "margin-top", "-.3ch";
109-
];
113+
rule "#debug nav .history li.selected.show" ["border-left", "3px solid white"];
110114
rule "#debug nav .history span.message" [
111115
"display", "inline-block"; "cursor", "pointer";
112116
"white-space", "nowrap"; "overflow", "hidden"; "text-overflow", "ellipsis";
117+
"width", "calc(100% - 75px)"
113118
];
114119
rule "#debug nav .history span.index" [
115120
"display", "inline-block";
@@ -203,10 +208,10 @@ let debug
203208
let selected = i = selected_index in
204209
li [
205210
E.onClick (SelectHistoryItem i);
206-
A.classList ["selected", selected]
211+
A.classList ["selected", selected; "show", selected && model.show_details]
207212
] [
208213
span (
209-
A.classList ["details", true; "show", selected && model.show_details] ::
214+
A.classList ["details", true; "show"] ::
210215
if selected
211216
then [E.onClick ToggleDetails; A.title "toggle details"]
212217
else [A.noProp;A.noProp]

0 commit comments

Comments
 (0)