mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
return Self implementation
This commit is contained in:
parent
bdad712690
commit
003486e3ed
22 changed files with 22 additions and 22 deletions
|
|
@ -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(),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ pub struct Text {
|
|||
|
||||
impl Text {
|
||||
// Construct
|
||||
pub fn new() -> Text {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
widget: ScrolledWindow::builder().build(),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub struct Meta {
|
|||
}
|
||||
|
||||
impl Meta {
|
||||
pub fn new() -> Meta {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
title: GString::new(),
|
||||
description: GString::new(),
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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...")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue