mirror of https://github.com/lapce/lapce.git
Extract padding
This commit is contained in:
parent
451aa6a1b9
commit
6ad092053f
|
@ -541,6 +541,7 @@ fn paint(
|
|||
) {
|
||||
let width = 13.0;
|
||||
let height = 13.0;
|
||||
let padding = 4.0;
|
||||
let editor_tab = data.main_split.editor_tabs.get(&widget_id).unwrap();
|
||||
|
||||
let rect = Size::new(width, height).to_rect().with_origin(Point::new(
|
||||
|
@ -582,7 +583,7 @@ fn paint(
|
|||
let svg = get_svg("close.svg").unwrap();
|
||||
ctx.draw_svg(
|
||||
&svg,
|
||||
self.close_rect.inflate(-4.0, -4.0),
|
||||
self.close_rect.inflate(-padding, -padding),
|
||||
Some(
|
||||
data.config
|
||||
.get_color_unchecked(LapceTheme::EDITOR_FOREGROUND),
|
||||
|
@ -605,7 +606,7 @@ fn paint(
|
|||
let svg = get_svg("unsaved.svg").unwrap();
|
||||
ctx.draw_svg(
|
||||
&svg,
|
||||
self.close_rect.inflate(-4.0, -4.0),
|
||||
self.close_rect.inflate(-padding, -padding),
|
||||
Some(
|
||||
data.config
|
||||
.get_color_unchecked(LapceTheme::EDITOR_FOREGROUND),
|
||||
|
|
Loading…
Reference in New Issue