Skip to content

Commit

Permalink
Adjust baselines of focus area
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Daily committed Nov 22, 2024
1 parent 9fe46df commit a4ce015
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ RawBoxes @ ToBoxes @ Graphics[
},
ImageSize -> { 6.0, 4.0 },
PlotRange -> { { -0.5, 5.5 }, { -0.5, 3.5 } },
AspectRatio -> Automatic
AspectRatio -> Automatic,
BaselinePosition -> Center -> Center
]
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ RawBoxes @ ToBoxes @ Mouseover[
RGBColor[ 1.0, 1.0, 1.0, 1.0 ]
]
},
(* ImageMargins -> { { 0, 1 }, { 1, 0 } }, *)
ImageSize -> { 11.0, 11.0 },
PlotRange -> { { -0.5, 10.5 }, { -0.5, 10.5 } },
AspectRatio -> Automatic
AspectRatio -> Automatic,
BaselinePosition -> Center -> Center
],
Graphics[
{
Expand Down Expand Up @@ -115,8 +117,11 @@ RawBoxes @ ToBoxes @ Mouseover[
RGBColor[ 1.0, 1.0, 1.0, 1.0 ]
]
},
(* ImageMargins -> { { 0, 1 }, { 1, 0 } }, *)
ImageSize -> { 11.0, 11.0 },
PlotRange -> { { -0.5, 10.5 }, { -0.5, 10.5 } },
AspectRatio -> Automatic
]
AspectRatio -> Automatic,
BaselinePosition -> Center -> Center
],
BaselinePosition -> Baseline
]
Original file line number Diff line number Diff line change
Expand Up @@ -276,5 +276,6 @@ RawBoxes @ ToBoxes @ Graphics[
},
ImageSize -> { 12.0, 12.0 },
PlotRange -> { { -0.5, 11.5 }, { -0.5, 11.5 } },
AspectRatio -> Automatic
AspectRatio -> Automatic,
BaselinePosition -> Center -> Center
]
Original file line number Diff line number Diff line change
Expand Up @@ -276,5 +276,6 @@ RawBoxes @ ToBoxes @ Graphics[
},
ImageSize -> { 12.0, 12.0 },
PlotRange -> { { -0.5, 11.5 }, { -0.5, 11.5 } },
AspectRatio -> Automatic
AspectRatio -> Automatic,
BaselinePosition -> Center -> Center
]
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ RawBoxes @ ToBoxes @ Mouseover[
FaceForm @ RGBColor[ 0.53725, 0.53725, 0.53725, 1.0 ]
]
},
(* ImageMargins -> { { 0, 1 }, { 1, 0 } }, *)
ImageSize -> { 11.0, 11.0 },
PlotRange -> { { -0.5, 10.5 }, { -0.5, 10.5 } },
AspectRatio -> Automatic
AspectRatio -> Automatic,
BaselinePosition -> Center -> Center
],
Graphics[
{
Expand Down Expand Up @@ -173,8 +175,11 @@ RawBoxes @ ToBoxes @ Mouseover[
FaceForm @ RGBColor[ 0.74902, 0.74902, 0.74902, 1.0 ]
]
},
(* ImageMargins -> { { 0, 1 }, { 1, 0 } }, *)
ImageSize -> { 11.0, 11.0 },
PlotRange -> { { -0.5, 10.5 }, { -0.5, 10.5 } },
AspectRatio -> Automatic
]
AspectRatio -> Automatic,
BaselinePosition -> Center -> Center
],
BaselinePosition -> Baseline
]
9 changes: 9 additions & 0 deletions FrontEnd/TextResources/ChatbookResources.tr
Original file line number Diff line number Diff line change
Expand Up @@ -5640,6 +5640,7 @@ cdub74kO+2HuhfGBjt4hx8oK56uyNU515oa7A+4umPmw8ILZC+KuNBRxgLkP
xoe5Hz18AaZOtJQ=
"]]},
AspectRatio->Automatic,
BaselinePosition->(Center -> Center),
ImageSize->{6., 4.},
PlotRange->{{-0.5, 5.5}, {-0.5, 3.5}}],

Expand All @@ -5659,6 +5660,7 @@ xoe5Hz18AaZOtJQ=
5.3422}, {7.7707, 7.6712}}},
CurveClosed->{0}]}},
AspectRatio->Automatic,
BaselinePosition->(Center -> Center),
ImageSize->{11., 11.},
PlotRange->{{-0.5, 10.5}, {-0.5, 10.5}}], True->
GraphicsBox[
Expand All @@ -5676,9 +5678,11 @@ xoe5Hz18AaZOtJQ=
5.3422}, {7.7707, 7.6712}}},
CurveClosed->{0}]}},
AspectRatio->Automatic,
BaselinePosition->(Center -> Center),
ImageSize->{11., 11.},
PlotRange->{{-0.5, 10.5}, {-0.5, 10.5}}]}, Dynamic[
CurrentValue["MouseOver"]],
BaselinePosition->Baseline,
FrameMargins->0,
ImageSize->Automatic],

Expand Down Expand Up @@ -5769,6 +5773,7 @@ Ugiun9VE0MzmrwDc/JvxZf5y09gdyoGy+rGiDjyTVzYFnuSGuy+nomqpzmEm
h3yh5gOnFkrB5WH+g+mH+R9mPix8YPajhx8ATEJ2sA==
"]}]}},
AspectRatio->Automatic,
BaselinePosition->(Center -> Center),
ImageSize->{12., 12.},
PlotRange->{{-0.5, 11.5}, {-0.5, 11.5}}],

Expand Down Expand Up @@ -5859,6 +5864,7 @@ Ugiun9VE0MzmrwDc/JvxZf5y09gdyoGy+rGiDjyTVzYFnuSGuy+nomqpzmEm
h3yh5gOnFkrB5WH+g+mH+R9mPix8YPajhx8ATEJ2sA==
"]}]}},
AspectRatio->Automatic,
BaselinePosition->(Center -> Center),
ImageSize->{12., 12.},
PlotRange->{{-0.5, 11.5}, {-0.5, 11.5}}],

Expand All @@ -5884,6 +5890,7 @@ JfLLHtW8D/ao9n2wRw2PD/aLGfewCgH1wfhyy1946P1/bw8zD8aH2Qfjw9wD
48Pci2qeElp8K2H4HwCLaL8E
"]]}},
AspectRatio->Automatic,
BaselinePosition->(Center -> Center),
ImageSize->{11., 11.},
PlotRange->{{-0.5, 10.5}, {-0.5, 10.5}}], True->
GraphicsBox[
Expand All @@ -5907,9 +5914,11 @@ JfLLHtW8D/ao9n2wRw2PD/aLGfewCgH1wfhyy1946P1/bw8zD8aH2Qfjw9wD
48Pci2qeElp8K2H4HwCLaL8E
"]]}},
AspectRatio->Automatic,
BaselinePosition->(Center -> Center),
ImageSize->{11., 11.},
PlotRange->{{-0.5, 10.5}, {-0.5, 10.5}}]}, Dynamic[
CurrentValue["MouseOver"]],
BaselinePosition->Baseline,
FrameMargins->0,
ImageSize->Automatic]
}
Expand Down
24 changes: 15 additions & 9 deletions Source/Chatbook/ChatModes/UI.wl
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,15 @@ focusedNotebookDisplay[ chatNB_ ] := Enclose[
{
True -> $disableNotebookFocusLabel,
False -> $enableNotebookFocusLabel
}
},
BaselinePosition -> Baseline
],
tr[ "WorkspaceFocusIndicatorFocus" ],
focusedNotebookDisplay0[ chatNB, focused, locked, info ]
} },
Alignment -> { Left, Baseline },
BaseStyle -> { "Text", FontColor -> GrayLevel[ 0.5 ], FontSize -> 13 }
Alignment -> { Left, Baseline },
BaseStyle -> { "Text", FontColor -> GrayLevel[ 0.5 ], FontSize -> 13 },
BaselinePosition -> { 1, 2 } (* align to the text *)
];

Pane[ label, ImageMargins -> { { 0, 0 }, { 0, 0 } } ]
Expand All @@ -534,7 +536,8 @@ focusedNotebookDisplay0[ chatNB_, focused_, locked_, info_ ] := Grid[
currentNotebookButton @ focused,
selectNotebookFocusMenu[ chatNB, locked, info ]
} },
BaselinePosition -> Baseline,
Alignment -> { Left, Baseline },
BaselinePosition -> { 1, 1 }, (* align to the button *)
Dividers -> Center,
FrameStyle -> GrayLevel[ 0.75 ]
];
Expand Down Expand Up @@ -580,8 +583,9 @@ currentNotebookButton[ as: KeyValuePattern @ { "NotebookObject" -> nbo_NotebookO
s_String :> FE`Evaluate @ FEPrivate`TruncateStringToWidth[ s, "Text", 200, Right ]
],
SetSelectedNotebook @ nbo,
Appearance -> "Suppressed",
BaseStyle -> { "Text", FontColor -> GrayLevel[ 0.5 ], FontSize -> 13 }
Appearance -> "Suppressed",
BaseStyle -> { "Text", FontColor -> GrayLevel[ 0.5 ], FontSize -> 13 },
BaselinePosition -> Baseline
];

currentNotebookButton // endDefinition;
Expand All @@ -607,7 +611,8 @@ currentNotebookButtonLabel[ title_ ] := Mouseover[
Style[ title, FontColor -> RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] ]
},
BaselinePosition -> Baseline
]
],
BaselinePosition -> Baseline
];

currentNotebookButtonLabel // endDefinition;
Expand All @@ -630,8 +635,9 @@ selectNotebookFocusMenu[ chatNB_, locked_, first_, rest_ ] := Tooltip[
Delimiter,
otherNotebookActions[ chatNB, locked, rest ]
},
Appearance -> "Suppressed",
BaseStyle -> { "Text", FontColor -> GrayLevel[ 0.5 ], FontSize -> 13, Magnification -> Inherited / 0.85 }
Appearance -> "Suppressed",
BaseStyle -> { "Text", FontColor -> GrayLevel[ 0.5 ], FontSize -> 13, Magnification -> Inherited / 0.85 },
BaselinePosition -> Baseline
],
tr[ "WorkspaceFocusIndicatorMenuTooltip" ]
];
Expand Down

0 comments on commit a4ce015

Please sign in to comment.