From 0df296c6602e81efad09d4444a05593603868ec7 Mon Sep 17 00:00:00 2001 From: Ilya Malyavin Date: Fri, 2 Jun 2023 17:37:59 +0200 Subject: [PATCH 1/3] Support custom header buttons layouts --- src/buttons.rs | 221 ++++++++++++++++++++++++++++++++++++++----------- src/config.rs | 34 ++++++++ src/lib.rs | 115 ++++++++++++++----------- 3 files changed, 271 insertions(+), 99 deletions(-) diff --git a/src/buttons.rs b/src/buttons.rs index d124ba8..339fba4 100644 --- a/src/buttons.rs +++ b/src/buttons.rs @@ -1,3 +1,4 @@ +use log::warn; use tiny_skia::{FillRule, PathBuilder, PixmapMut, Rect, Stroke, Transform}; use smithay_client_toolkit::shell::xdg::window::{WindowManagerCapabilities, WindowState}; @@ -11,42 +12,59 @@ const BUTTON_SPACING: f32 = 13.; #[derive(Debug)] pub(crate) struct Buttons { - pub close: Button, - pub maximize: Option