1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Style tweaks (#2406)

* Note the namechange of egui::color to egui::ecolor

* Use a solid triangle for collapsing headers and windows

* Add Shadow::NONE

* Add Visuals::panel_fill, window_fill and window_stroke

* Bug fix: ComboBox::width sets the outer width of the ComboBox

* egui_extras::Table: add functions to access the `Ui` for the header/body

* ComboBox: use solid triangle

* Tweak default menu margin

* Nudge panel separator lines so they stay visible

* Update changelogs
This commit is contained in:
Emil Ernerfeldt
2022-12-08 10:55:13 +01:00
committed by GitHub
parent 5effc68ba4
commit da0a178701
12 changed files with 164 additions and 92 deletions

View File

@@ -516,6 +516,13 @@ pub struct Table<'a> {
}
impl<'a> Table<'a> {
/// Access the contained [`egui::Ui`].
///
/// You can use this to e.g. modify the [`egui::Style`] with [`egui::Ui::style_mut`].
pub fn ui_mut(&mut self) -> &mut egui::Ui {
self.ui
}
/// Create table body after adding a header row
pub fn body<F>(self, add_body_contents: F)
where
@@ -724,6 +731,13 @@ pub struct TableBody<'a> {
}
impl<'a> TableBody<'a> {
/// Access the contained [`egui::Ui`].
///
/// You can use this to e.g. modify the [`egui::Style`] with [`egui::Ui::style_mut`].
pub fn ui_mut(&mut self) -> &mut egui::Ui {
self.layout.ui
}
/// Where in screen-space is the table body?
pub fn max_rect(&self) -> Rect {
self.layout