Marble: clippy
This commit is contained in:
parent
c074d31445
commit
daa20d3871
|
@ -1,87 +1,87 @@
|
|||
/**
|
||||
* Style class to give accent color to a {@link Gtk.Label} or symbolic icon
|
||||
*/
|
||||
pub const STYLE_CLASS_ACCENT: &'static str = "accent";
|
||||
pub const STYLE_CLASS_ACCENT: &str = "accent";
|
||||
|
||||
/**
|
||||
* Style class for shaping a {@link Gtk.Button}
|
||||
*/
|
||||
pub const STYLE_CLASS_BACK_BUTTON: &'static str = "back-button";
|
||||
pub const STYLE_CLASS_BACK_BUTTON: &str = "back-button";
|
||||
/**
|
||||
* Style class for numbered badges as in a {@link Granite.Widgets.SourceList}
|
||||
*/
|
||||
pub const STYLE_CLASS_BADGE: &'static str = "badge";
|
||||
pub const STYLE_CLASS_BADGE: &str = "badge";
|
||||
/**
|
||||
* Style class for adding a small shadow to a container such as for image thumbnails
|
||||
*
|
||||
* Can be combined with the style class ".collapsed" to further reduce the size of the shadow
|
||||
*/
|
||||
pub const STYLE_CLASS_CARD: &'static str = "card";
|
||||
pub const STYLE_CLASS_CATEGORY_EXPANDER: &'static str = "category-expander";
|
||||
pub const STYLE_CLASS_CARD: &str = "card";
|
||||
pub const STYLE_CLASS_CATEGORY_EXPANDER: &str = "category-expander";
|
||||
/**
|
||||
* Style class for checkered backgrounds to represent transparency in images
|
||||
*/
|
||||
pub const STYLE_CLASS_CHECKERBOARD: &'static str = "checkerboard";
|
||||
pub const STYLE_CLASS_CHECKERBOARD: &str = "checkerboard";
|
||||
/**
|
||||
* Style class for color chooser buttons to be applied to {@link Gtk.CheckButton} or {@link Gtk.RadioButton}
|
||||
*/
|
||||
pub const STYLE_CLASS_COLOR_BUTTON: &'static str = "color-button";
|
||||
pub const STYLE_CLASS_COLOR_BUTTON: &str = "color-button";
|
||||
/**
|
||||
* Style class for slim headerbars, like in Terminal
|
||||
*/
|
||||
pub const STYLE_CLASS_DEFAULT_DECORATION: &'static str = "default-decoration";
|
||||
pub const STYLE_CLASS_DEFAULT_DECORATION: &str = "default-decoration";
|
||||
/**
|
||||
* Style class for large primary text as seen in {@link Granite.Widgets.Welcome}
|
||||
*/
|
||||
pub const STYLE_CLASS_H1_LABEL: &'static str = "h1";
|
||||
pub const STYLE_CLASS_H1_LABEL: &str = "h1";
|
||||
/**
|
||||
* Style class for large seondary text as seen in {@link Granite.Widgets.Welcome}
|
||||
*/
|
||||
pub const STYLE_CLASS_H2_LABEL: &'static str = "h2";
|
||||
pub const STYLE_CLASS_H2_LABEL: &str = "h2";
|
||||
/**
|
||||
* Style class for small primary text
|
||||
*/
|
||||
pub const STYLE_CLASS_H3_LABEL: &'static str = "h3";
|
||||
pub const STYLE_CLASS_H3_LABEL: &str = "h3";
|
||||
/**
|
||||
* Style class for a {@link Granite.HeaderLabel}
|
||||
*/
|
||||
pub const STYLE_CLASS_H4_LABEL: &'static str = "h4";
|
||||
pub const STYLE_CLASS_H4_LABEL: &str = "h4";
|
||||
/**
|
||||
* Style class for a {@link Gtk.Label} to be displayed as a keyboard key cap
|
||||
*/
|
||||
pub const STYLE_CLASS_KEYCAP: &'static str = "keycap";
|
||||
pub const STYLE_CLASS_KEYCAP: &str = "keycap";
|
||||
/**
|
||||
* Style class for a {@link Gtk.Switch} used to change between two modes rather than active and inactive states
|
||||
*/
|
||||
pub const STYLE_CLASS_MODE_SWITCH: &'static str = "mode-switch";
|
||||
pub const STYLE_CLASS_MODE_SWITCH: &str = "mode-switch";
|
||||
/**
|
||||
* Style class for a {@link Granite.Widgets.OverlayBar}
|
||||
*/
|
||||
pub const STYLE_CLASS_OVERLAY_BAR: &'static str = "overlay-bar";
|
||||
pub const STYLE_CLASS_OVERLAY_BAR: &str = "overlay-bar";
|
||||
/**
|
||||
* Style class for primary label text in a {@link Granite.MessageDialog}
|
||||
*/
|
||||
pub const STYLE_CLASS_PRIMARY_LABEL: &'static str = "primary";
|
||||
pub const STYLE_CLASS_PRIMARY_LABEL: &str = "primary";
|
||||
/**
|
||||
* Style class for rounded corners, i.e. on a {@link Gtk.Window} or {@link Granite.STYLE_CLASS_CARD}
|
||||
*/
|
||||
pub const STYLE_CLASS_ROUNDED: &'static str = "rounded";
|
||||
pub const STYLE_CLASS_ROUNDED: &str = "rounded";
|
||||
/**
|
||||
* Style class for a {@link Granite.SeekBar}
|
||||
*/
|
||||
pub const STYLE_CLASS_SEEKBAR: &'static str = "seek-bar";
|
||||
pub const STYLE_CLASS_SEEKBAR: &str = "seek-bar";
|
||||
/**
|
||||
* Style class for a {@link Gtk.Label} to emulate Pango's "<small>" and "size='smaller'"
|
||||
*/
|
||||
pub const STYLE_CLASS_SMALL_LABEL: &'static str = "small-label";
|
||||
pub const STYLE_CLASS_SMALL_LABEL: &str = "small-label";
|
||||
/**
|
||||
* Style class for a {@link Granite.Widgets.SourceList}
|
||||
*/
|
||||
pub const STYLE_CLASS_SOURCE_LIST: &'static str = "source-list";
|
||||
pub const STYLE_CLASS_SOURCE_LIST: &str = "source-list";
|
||||
/**
|
||||
* Style class for a {@link Granite.Widgets.Granite.Widgets.StorageBar}
|
||||
*/
|
||||
pub const STYLE_CLASS_STORAGEBAR: &'static str = "storage-bar";
|
||||
pub const STYLE_CLASS_STORAGEBAR: &str = "storage-bar";
|
||||
/**
|
||||
* Style class for {@link Gtk.Label} or {@link Gtk.TextView} to emulate the appearance of Terminal. This includes
|
||||
* text color, background color, selection highlighting, and selecting the system monospace font.
|
||||
|
@ -89,19 +89,19 @@ pub const STYLE_CLASS_STORAGEBAR: &'static str = "storage-bar";
|
|||
* When used with {@link Gtk.Label} this style includes usizeernal padding. When used with {@link Gtk.TextView}
|
||||
* usizeeral padding will need to be set with {@link Gtk.Container.border_width}
|
||||
*/
|
||||
pub const STYLE_CLASS_TERMINAL: &'static str = "terminal";
|
||||
pub const STYLE_CLASS_TERMINAL: &str = "terminal";
|
||||
/**
|
||||
* Style class for a {@link Granite.Widgets.Welcome}
|
||||
*/
|
||||
pub const STYLE_CLASS_WELCOME: &'static str = "welcome";
|
||||
pub const STYLE_CLASS_WELCOME: &str = "welcome";
|
||||
/**
|
||||
* Style class for a warmth scale, a {@link Gtk.Scale} with a "less warm" to "more warm" color gradient
|
||||
*/
|
||||
pub const STYLE_CLASS_WARMTH: &'static str = "warmth";
|
||||
pub const STYLE_CLASS_WARMTH: &str = "warmth";
|
||||
/**
|
||||
* Style class for a temperature scale, a {@link Gtk.Scale} with a "cold" to "hot" color gradient
|
||||
*/
|
||||
pub const STYLE_CLASS_TEMPERATURE: &'static str = "temperature";
|
||||
pub const STYLE_CLASS_TEMPERATURE: &str = "temperature";
|
||||
|
||||
/**
|
||||
* Transition duration when a widget closes, hides a portion of its content, or exits the screen
|
||||
|
|
|
@ -95,7 +95,7 @@ mod imp {
|
|||
fn constructed(&self, obj: &Self::Type) {
|
||||
self.parent_constructed(obj);
|
||||
|
||||
obj.style_context().add_class(&*gtk::STYLE_CLASS_VIEW);
|
||||
obj.style_context().add_class(*gtk::STYLE_CLASS_VIEW);
|
||||
|
||||
let title_label = gtk::Label::new(None);
|
||||
title_label.set_hexpand(true);
|
||||
|
|
|
@ -9,6 +9,12 @@ impl Dialog {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for Dialog {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
mod imp {
|
||||
use gtk::{prelude::*, subclass::prelude::*};
|
||||
|
||||
|
|
Loading…
Reference in a new issue