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")

View File

@ -13,7 +13,7 @@ pub struct Main {
impl Main {
// Construct
pub fn new() -> Main {
pub fn new() -> Self {
// Init components
let tab = Arc::new(Tab::new());

View File

@ -6,7 +6,7 @@ pub struct Title {
impl Title {
// Construct
pub fn new() -> Title {
pub fn new() -> Self {
Self {
widget: Label::builder()
.label("New page")

View File

@ -6,7 +6,7 @@ pub struct Content {
impl Content {
// Construct
pub fn new() -> Content {
pub fn new() -> Self {
Self {
widget: Box::builder().orientation(Orientation::Vertical).build(),
}

View File

@ -6,7 +6,7 @@ pub struct Reader {
impl Reader {
// Construct
pub fn new() -> Reader {
pub fn new() -> Self {
Self {
widget: Label::builder()
.halign(Align::Start)

View File

@ -6,7 +6,7 @@ pub struct Text {
impl Text {
// Construct
pub fn new() -> Text {
pub fn new() -> Self {
Self {
widget: ScrolledWindow::builder().build(),
}

View File

@ -6,7 +6,7 @@ pub struct Reader {
impl Reader {
// Construct
pub fn new() -> Reader {
pub fn new() -> Self {
Self {
widget: Label::builder()
.halign(Align::Start)

View File

@ -14,7 +14,7 @@ pub struct Meta {
}
impl Meta {
pub fn new() -> Meta {
pub fn new() -> Self {
Self {
title: GString::new(),
description: GString::new(),

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@ pub struct History {
impl History {
// Construct
pub fn new() -> History {
pub fn new() -> Self {
// init components
let back = Back::new();
let forward = Forward::new();

View File

@ -24,7 +24,7 @@ pub struct Navigation {
}
impl Navigation {
pub fn new() -> Navigation {
pub fn new() -> Self {
// Init components
let base = Base::new();
let history = History::new();

View File

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

View File

@ -10,7 +10,7 @@ pub struct Request {
impl Request {
// Construct
pub fn new() -> Request {
pub fn new() -> Self {
// GTK
let widget = Entry::builder()
.placeholder_text("URL or search term...")