mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
feat: libinput keys
module
Adds a new module which shows the status of toggle mod keys (capslock, num lock, scroll lock). Resolves #700
This commit is contained in:
parent
353ee92d48
commit
ccfe73f6a7
20 changed files with 799 additions and 107 deletions
|
@ -20,6 +20,8 @@ pub struct WidgetGeometry {
|
|||
pub trait IronbarGtkExt {
|
||||
/// Adds a new CSS class to the widget.
|
||||
fn add_class(&self, class: &str);
|
||||
/// Removes a CSS class to the widget.
|
||||
fn remove_class(&self, class: &str);
|
||||
/// Gets the geometry for the widget
|
||||
fn geometry(&self, orientation: Orientation) -> WidgetGeometry;
|
||||
|
||||
|
@ -34,6 +36,10 @@ impl<W: IsA<Widget>> IronbarGtkExt for W {
|
|||
self.style_context().add_class(class);
|
||||
}
|
||||
|
||||
fn remove_class(&self, class: &str) {
|
||||
self.style_context().remove_class(class);
|
||||
}
|
||||
|
||||
fn geometry(&self, orientation: Orientation) -> WidgetGeometry {
|
||||
let allocation = self.allocation();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue