Default libcosmic editor to monospace
This commit is contained in:
parent
e37a7c23a9
commit
a99a5dd0fb
1 changed files with 5 additions and 2 deletions
|
|
@ -108,9 +108,12 @@ impl Application for Window {
|
||||||
|
|
||||||
fn new(_flags: ()) -> (Self, Command<Self::Message>) {
|
fn new(_flags: ()) -> (Self, Command<Self::Message>) {
|
||||||
let font_size_i = 1; // Body
|
let font_size_i = 1; // Body
|
||||||
|
let attrs = cosmic_text::Attrs::new()
|
||||||
|
.monospaced(true)
|
||||||
|
.family(cosmic_text::Family::Monospace);
|
||||||
let buffer = TextBuffer::new(
|
let buffer = TextBuffer::new(
|
||||||
&FONT_SYSTEM,
|
&FONT_SYSTEM,
|
||||||
cosmic_text::Attrs::new(),
|
attrs,
|
||||||
FONT_SIZES[font_size_i],
|
FONT_SIZES[font_size_i],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -121,7 +124,7 @@ impl Application for Window {
|
||||||
cache: Mutex::new(SwashCache::new()),
|
cache: Mutex::new(SwashCache::new()),
|
||||||
bold: false,
|
bold: false,
|
||||||
italic: false,
|
italic: false,
|
||||||
monospaced: false,
|
monospaced: true,
|
||||||
};
|
};
|
||||||
if let Some(arg) = env::args().nth(1) {
|
if let Some(arg) = env::args().nth(1) {
|
||||||
window.open(PathBuf::from(arg));
|
window.open(PathBuf::from(arg));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue