style: format source files with cargo fmt
parent
3a4792cbfe
commit
02e437b76c
|
@ -3,37 +3,25 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use glib::IsA;
|
||||
use gtk::{prelude::*, Box, Widget, Button};
|
||||
use gtk::{prelude::*, Box, Button, Widget};
|
||||
|
||||
pub trait ClosableTabImplementedNotebook {
|
||||
fn prepend_closable_page<
|
||||
T: IsA<Widget>,
|
||||
U: IsA<Widget>
|
||||
>(
|
||||
fn prepend_closable_page<T: IsA<Widget>, U: IsA<Widget>>(
|
||||
&self,
|
||||
child: &T,
|
||||
tab_label: Option<&U>,
|
||||
) -> u32;
|
||||
fn append_closable_page<
|
||||
T: IsA<Widget>,
|
||||
U: IsA<Widget>
|
||||
>(
|
||||
fn append_closable_page<T: IsA<Widget>, U: IsA<Widget>>(
|
||||
&self,
|
||||
child: &T,
|
||||
tab_label: Option<&U>,
|
||||
) -> u32;
|
||||
|
||||
fn create_closable_tab<
|
||||
U: IsA<Widget>,
|
||||
|
||||
>(tab_label: Option<&U>) -> (Box, Button);
|
||||
fn create_closable_tab<U: IsA<Widget>>(tab_label: Option<&U>) -> (Box, Button);
|
||||
}
|
||||
|
||||
impl ClosableTabImplementedNotebook for gtk::Notebook {
|
||||
fn create_closable_tab<
|
||||
U: IsA<Widget>,
|
||||
|
||||
>(tab_label: Option<&U>)-> (Box, Button) {
|
||||
fn create_closable_tab<U: IsA<Widget>>(tab_label: Option<&U>) -> (Box, Button) {
|
||||
let tab = Box::new(gtk::Orientation::Horizontal, 5);
|
||||
if tab_label.is_some() {
|
||||
tab.append(tab_label.unwrap());
|
||||
|
@ -63,13 +51,9 @@ impl ClosableTabImplementedNotebook for gtk::Notebook {
|
|||
}));
|
||||
|
||||
page
|
||||
|
||||
}
|
||||
|
||||
fn append_closable_page<
|
||||
T: IsA<Widget>,
|
||||
U: IsA<Widget>
|
||||
>(
|
||||
fn append_closable_page<T: IsA<Widget>, U: IsA<Widget>>(
|
||||
&self,
|
||||
child: &T,
|
||||
tab_label: Option<&U>,
|
||||
|
|
Loading…
Reference in New Issue