Remove macOS specific debugging code

This commit is contained in:
Ebu
2025-12-02 13:20:54 +01:00
parent c730cc1b62
commit 80c522095c
7 changed files with 18 additions and 66 deletions

View File

@@ -5,7 +5,7 @@ use baseview::{
use ebu_dsp::Rect;
use femtovg::{Canvas, Color, FontId, ImageFlags, ImageId, Paint, Path, renderer::OpenGl};
use nih_plug::prelude::*;
use std::{fmt::Debug, sync::Arc};
use std::sync::Arc;
const DROID_SANS_FONT: &'static [u8] = include_bytes!("../assets/DroidSans.ttf");
@@ -25,12 +25,12 @@ pub struct PluginGui {
_gui_context: Arc<dyn GuiContext>,
scaling_factor: f32,
freshener_bounds: Rect<f32>,
freshener_image: Result<ImageId, String>,
not_so_fresh_image: Result<ImageId, String>,
fresh_dumbledore_image: Result<ImageId, String>,
freshener_bounds: Rect<f32>,
dirty: bool,
mouse_position: (f32, f32),
drag_start_mouse_pos: (f32, f32),
@@ -72,12 +72,7 @@ impl PluginGui {
freshener_image: Err("Not loaded".to_owned()),
fresh_dumbledore_image: Err("Not loaded".to_owned()),
not_so_fresh_image: Err("Not loaded".to_owned()),
freshener_bounds: Rect {
x: 120.0,
y: 20.0,
width: FRESHENER_FRAME_WIDTH,
height: FRESHENER_FRAME_HEIGHT,
},
freshener_bounds: Rect::default()
};
if let Some(context) = window.gl_context() {
@@ -134,6 +129,14 @@ impl WindowHandler for PluginGui {
//return;
}
let font_size = 12.0 * self.scaling_factor;
self.freshener_bounds = Rect {
x: 120.0 * self.scaling_factor,
y: 20.0 * self.scaling_factor,
width: FRESHENER_FRAME_WIDTH * self.scaling_factor,
height: FRESHENER_FRAME_HEIGHT * self.scaling_factor,
};
let context = match window.gl_context() {
None => {
nih_error!("No OpenGL context");
@@ -149,12 +152,7 @@ impl WindowHandler for PluginGui {
canvas.clear_rect(0, 0, width, height, Color::rgbaf(0.5, 0.5, 0.6, 1.0));
let mut full_window_path = Path::new();
full_window_path.rect(
0.0,
0.0,
EditorWindow::WINDOW_SIZE.0 as f32,
EditorWindow::WINDOW_SIZE.1 as f32,
);
full_window_path.rect(0.0, 0.0, width as f32, height as f32);
let mut freshener_path = Path::new();
freshener_path.rect(
@@ -229,11 +227,11 @@ impl WindowHandler for PluginGui {
str,
&Paint::color(Color::white())
.with_font(&[font])
.with_font_size(12.0)
.with_font_size(font_size)
.with_text_baseline(Baseline::Top),
)
.ok();
y += 12.0;
y += font_size;
};
print("Debug version");