More font changes, bump up sizes, add some space

This commit is contained in:
Mike Dilger 2023-01-16 16:09:12 +13:00
parent 22f8a75195
commit 8bad130214
5 changed files with 20 additions and 36 deletions

Binary file not shown.

View File

@ -1,9 +0,0 @@
MIT License
Copyright (c) 2014 John Slegers
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Binary file not shown.

View File

@ -424,6 +424,8 @@ fn render_post_actual(
thin_red_separator(ui);
}
ui.add_space(4.0);
ui.horizontal(|ui| {
// Indents first (if threaded)
if threaded {
@ -520,6 +522,8 @@ fn render_post_actual(
render_content(app, ui, &tag_re, &event);
});
ui.add_space(8.0);
// Under row
if !as_reply_to {
ui.horizontal(|ui| {
@ -569,6 +573,8 @@ fn render_post_actual(
});
});
ui.add_space(4.0);
if is_main_event {
thin_red_separator(ui);
}

View File

@ -1,6 +1,6 @@
use eframe::{egui, epaint};
use egui::style::{Selection, Visuals, Widgets};
use egui::{Color32, FontData, FontDefinitions, FontFamily, FontId, Rounding, Stroke, TextStyle};
use egui::{Color32, FontData, FontDefinitions, FontFamily, FontId, FontTweak, Rounding, Stroke, TextStyle};
use epaint::Shadow;
use std::collections::BTreeMap;
@ -84,7 +84,7 @@ pub(super) fn text_styles() -> BTreeMap<TextStyle, FontId> {
text_styles.insert(
TextStyle::Small,
FontId {
size: 12.5,
size: 13.0,
family: FontFamily::Proportional,
},
);
@ -92,7 +92,7 @@ pub(super) fn text_styles() -> BTreeMap<TextStyle, FontId> {
text_styles.insert(
TextStyle::Body,
FontId {
size: 15.0,
size: 15.5,
family: FontFamily::Proportional,
},
);
@ -100,7 +100,7 @@ pub(super) fn text_styles() -> BTreeMap<TextStyle, FontId> {
text_styles.insert(
TextStyle::Monospace,
FontId {
size: 15.0,
size: 15.5,
family: FontFamily::Monospace,
},
);
@ -108,7 +108,7 @@ pub(super) fn text_styles() -> BTreeMap<TextStyle, FontId> {
text_styles.insert(
TextStyle::Button,
FontId {
size: 16.0,
size: 17.25,
family: FontFamily::Proportional,
},
);
@ -116,7 +116,7 @@ pub(super) fn text_styles() -> BTreeMap<TextStyle, FontId> {
text_styles.insert(
TextStyle::Heading,
FontId {
size: 17.0,
size: 18.5,
family: FontFamily::Proportional,
},
);
@ -141,25 +141,14 @@ pub(super) fn font_definitions() -> FontDefinitions {
// Some good looking emojis. Use as first priority:
font_data.insert(
"NotoEmoji-Regular".to_owned(),
FontData::from_static(include_bytes!("../../fonts/NotoEmoji-Regular.ttf")), /*.tweak(
FontTweak {
scale: 0.81, // make it smaller
y_offset_factor: -0.2, // move it up
y_offset: 0.0,
},
)*/
);
// Bigger emojis, and more. <http://jslegers.github.io/emoji-icon-font/>:
font_data.insert(
"emoji-icon-font".to_owned(),
FontData::from_static(include_bytes!("../../fonts/emoji-icon-font.ttf")), /*.tweak(
FontTweak {
scale: 0.88, // make it smaller
y_offset_factor: 0.07, // move it down slightly
y_offset: 0.0,
},
)*/
FontData::from_static(include_bytes!("../../fonts/NotoEmoji-Regular.ttf"))
.tweak(
FontTweak {
scale: 1.1, // make them a touch larger
y_offset_factor: -0.2, // move them up
y_offset: 0.0,
},
)
);
families.insert(
@ -167,7 +156,6 @@ pub(super) fn font_definitions() -> FontDefinitions {
vec![
"DejaVuSans".to_owned(),
"NotoEmoji-Regular".to_owned(),
"emoji-icon-font".to_owned(),
],
);
@ -176,7 +164,6 @@ pub(super) fn font_definitions() -> FontDefinitions {
vec![
"Inconsolata".to_owned(),
"NotoEmoji-Regular".to_owned(),
"emoji-icon-font".to_owned(),
],
);