return Self implementation

This commit is contained in:
yggverse 2024-09-26 01:14:33 +03:00
parent bdad712690
commit 003486e3ed
22 changed files with 22 additions and 22 deletions

View file

@ -13,7 +13,7 @@ pub struct Header {
impl Header {
// Construct
pub fn new() -> Header {
pub fn new() -> Self {
let tray = Tray::new();
let subject = Subject::new();

View file

@ -7,7 +7,7 @@ pub struct Description {
impl Description {
// Construct
pub fn new() -> Description {
pub fn new() -> Self {
let widget = Label::builder()
.css_classes(["subtitle"])
.single_line_mode(true)

View file

@ -14,7 +14,7 @@ pub struct Subject {
impl Subject {
// Construct
pub fn new() -> Subject {
pub fn new() -> Self {
let title = Title::new();
let description = Description::new();

View file

@ -8,7 +8,7 @@ pub struct Title {
impl Title {
// Construct
pub fn new() -> Title {
pub fn new() -> Self {
let widget = gtk::Label::builder()
.css_classes(["title"])
.single_line_mode(true)

View file

@ -5,7 +5,7 @@ pub struct Menu {
}
impl Menu {
pub fn new() -> Menu {
pub fn new() -> Self {
// Init model
let model_tab = gio::Menu::new();
model_tab.append(Some("New"), Some("win.tab_append"));

View file

@ -11,7 +11,7 @@ pub struct Tray {
}
impl Tray {
pub fn new() -> Tray {
pub fn new() -> Self {
let menu = Menu::new();
let tab = Tab::new();

View file

@ -6,7 +6,7 @@ pub struct Tab {
impl Tab {
// Construct
pub fn new() -> Tab {
pub fn new() -> Self {
Self {
widget: Button::builder()
.action_name("win.tab_append")