mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Highlight submenu buttons when hovered and open (#3780)
Submenu buttons in menues now properly highlight when hovered and when opened. …plus a bunch of other cleanup
This commit is contained in:
@@ -290,10 +290,7 @@ impl FontImage {
|
||||
///
|
||||
/// If you are having problems with text looking skinny and pixelated, try using a low gamma, e.g. `0.4`.
|
||||
#[inline]
|
||||
pub fn srgba_pixels(
|
||||
&'_ self,
|
||||
gamma: Option<f32>,
|
||||
) -> impl ExactSizeIterator<Item = Color32> + '_ {
|
||||
pub fn srgba_pixels(&self, gamma: Option<f32>) -> impl ExactSizeIterator<Item = Color32> + '_ {
|
||||
let gamma = gamma.unwrap_or(0.55); // TODO(emilk): this default coverage gamma is a magic constant, chosen by eye. I don't even know why we need it.
|
||||
self.pixels.iter().map(move |coverage| {
|
||||
let alpha = coverage.powf(gamma);
|
||||
|
||||
Reference in New Issue
Block a user