Completely eliminate panel separation gap with unified horizontal container in v2.5.5
This commit is contained in:
+32
-15
@@ -16,7 +16,7 @@ use crate::updater::{
|
||||
};
|
||||
use eframe::egui::{
|
||||
self, Align, Button, CentralPanel, Color32, ColorImage, Frame, Layout, Margin, ProgressBar,
|
||||
RichText, Rounding, ScrollArea, SidePanel, Stroke, TextureHandle, TextureOptions, Ui, Vec2,
|
||||
RichText, Rounding, ScrollArea, Stroke, TextureHandle, TextureOptions, Ui, Vec2,
|
||||
};
|
||||
use human_bytes::human_bytes;
|
||||
use qrcode::{Color as QrColor, QrCode};
|
||||
@@ -5020,26 +5020,40 @@ impl eframe::App for ZeroSendApp {
|
||||
style.visuals.widgets.active.rounding = Rounding::same(6.0);
|
||||
ctx.set_style(style);
|
||||
|
||||
SidePanel::left("sidebar_panel")
|
||||
.resizable(false)
|
||||
.show_separator_line(false)
|
||||
.exact_width(200.0)
|
||||
.frame(
|
||||
Frame::none()
|
||||
.fill(theme.bg_sidebar)
|
||||
.inner_margin(Margin::same(12.0)),
|
||||
)
|
||||
.show(ctx, |ui| {
|
||||
self.render_sidebar(ctx, ui, theme);
|
||||
});
|
||||
|
||||
CentralPanel::default()
|
||||
.frame(
|
||||
Frame::none()
|
||||
.fill(theme.bg_app)
|
||||
.inner_margin(Margin::same(20.0)),
|
||||
.inner_margin(Margin::ZERO),
|
||||
)
|
||||
.show(ctx, |ui| {
|
||||
ui.spacing_mut().item_spacing = Vec2::ZERO;
|
||||
|
||||
ui.horizontal(|ui| {
|
||||
// ── Left Sidebar (200px) ──
|
||||
ui.allocate_ui(Vec2::new(200.0, ui.available_height()), |ui| {
|
||||
Frame::none()
|
||||
.fill(theme.bg_sidebar)
|
||||
.inner_margin(Margin::same(12.0))
|
||||
.show(ui, |ui| {
|
||||
ui.set_min_width(176.0);
|
||||
ui.set_min_height(ui.available_height());
|
||||
self.render_sidebar(ctx, ui, theme);
|
||||
});
|
||||
});
|
||||
|
||||
// ── Right Main Content Area ──
|
||||
let content_width = ui.available_width();
|
||||
let content_height = ui.available_height();
|
||||
ui.allocate_ui(Vec2::new(content_width, content_height), |ui| {
|
||||
Frame::none()
|
||||
.fill(theme.bg_app)
|
||||
.inner_margin(Margin::same(20.0))
|
||||
.show(ui, |ui| {
|
||||
ui.set_min_width(content_width - 40.0);
|
||||
ui.set_min_height(content_height - 40.0);
|
||||
ui.spacing_mut().item_spacing = Vec2::new(8.0, 8.0);
|
||||
|
||||
// Top Update Banner if update available on Gitea
|
||||
if self.show_update_banner {
|
||||
if let Some(info) = &self.update_info {
|
||||
@@ -5129,6 +5143,9 @@ impl eframe::App for ZeroSendApp {
|
||||
Tab::Settings => self.render_settings_tab(ui, theme),
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
self.render_modals(ctx, theme);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user