mirror of
https://github.com/emilk/egui.git
synced 2026-06-28 07:23:13 -04:00
Style tweaks (#450)
* Tweak style More compact, less round, less noisy * Button text is now same size as body text * The rounder corners are now less rounded * Collapsing headers no longer have a frame around them * Combo-boxes looks better when opened * Slightly more muted colors * Remove extra line spacing after `\n` (i.e. between paragraphs) * Thinner scrollbars * Tweak light mode * Tweak shadows * Fix broken doc link * Add style tweak to CHANGELOG
This commit is contained in:
@@ -15,10 +15,18 @@ pub struct Shadow {
|
||||
|
||||
impl Shadow {
|
||||
/// Tooltips, menus, ...
|
||||
pub fn small() -> Self {
|
||||
pub fn small_dark() -> Self {
|
||||
Self {
|
||||
extrusion: 8.0,
|
||||
color: Color32::from_black_alpha(64),
|
||||
extrusion: 16.0,
|
||||
color: Color32::from_black_alpha(96),
|
||||
}
|
||||
}
|
||||
|
||||
/// Tooltips, menus, ...
|
||||
pub fn small_light() -> Self {
|
||||
Self {
|
||||
extrusion: 16.0,
|
||||
color: Color32::from_black_alpha(32),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -400,7 +400,8 @@ impl Font {
|
||||
row.y_max += cursor_y;
|
||||
}
|
||||
cursor_y = paragraph_rows.last().unwrap().y_max;
|
||||
cursor_y += row_height * 0.2; // Extra spacing between paragraphs. TODO: less hacky
|
||||
|
||||
// cursor_y += row_height * 0.2; // Extra spacing between paragraphs.
|
||||
|
||||
rows.append(&mut paragraph_rows);
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ impl Default for FontDefinitions {
|
||||
let mut family_and_size = BTreeMap::new();
|
||||
family_and_size.insert(TextStyle::Small, (FontFamily::Proportional, 10.0));
|
||||
family_and_size.insert(TextStyle::Body, (FontFamily::Proportional, 14.0));
|
||||
family_and_size.insert(TextStyle::Button, (FontFamily::Proportional, 16.0));
|
||||
family_and_size.insert(TextStyle::Button, (FontFamily::Proportional, 14.0));
|
||||
family_and_size.insert(TextStyle::Heading, (FontFamily::Proportional, 20.0));
|
||||
family_and_size.insert(TextStyle::Monospace, (FontFamily::Monospace, 13.0)); // 13 for `ProggyClean`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user