diff --git a/src/app.rs b/src/app.rs index 33bd3b3..623752e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -9,7 +9,6 @@ live_design!{ import crate::welcome::welcome_screen::WelcomeScreen import crate::counter::counter_screen::CounterScreen - import crate::counter::counterscrn::CounterScrn import crate::shared::clickable_view::ClickableView import crate::shared::stack_navigation::*; @@ -46,14 +45,6 @@ live_design!{ dpi_override: 2 }, pass: {clear_color: #2A} - // show_bg: true - // width: Fill, - // height: Fill - // draw_bg: { - // fn pixel(self) -> vec4 { - // return mix(#7, #3, self.pos.y); - // } - // } body = { navigation = { root_view = { @@ -66,11 +57,9 @@ live_design!{ padding: 0.0 welcome_frame = { visible: true } - // welcome_frame = { visible: true } } } my_counter_stack_view = { - position: vec2(0, 0), header = { content = { title_container = { @@ -80,8 +69,7 @@ live_design!{ } } } - // {} - {} + {} } } } @@ -106,7 +94,6 @@ impl LiveHook for App { crate::welcome::welcome_screen::live_design(cx); // counter crate::counter::counter_screen::live_design(cx); - crate::counter::counterscrn::live_design(cx); // shared crate::shared::styles::live_design(cx); @@ -114,7 +101,6 @@ impl LiveHook for App { crate::shared::header::live_design(cx); crate::shared::search_bar::live_design(cx); crate::shared::custom_button::live_design(cx); - crate::shared::cbutton::live_design(cx); crate::shared::popup_menu::live_design(cx); crate::shared::dropdown_menu::live_design(cx); crate::shared::stack_navigation::live_design(cx); diff --git a/src/counter/counter_screen.rs b/src/counter/counter_screen.rs index d63c212..e0bd5fb 100644 --- a/src/counter/counter_screen.rs +++ b/src/counter/counter_screen.rs @@ -8,92 +8,105 @@ live_design! { import makepad_widgets::base::*; import makepad_widgets::theme_desktop_dark::*; - import crate::shared::helpers::FillerX; + import crate::shared::helpers::*; import crate::shared::helpers::Divider; import crate::shared::styles::*; import crate::shared::clickable_view::ClickableView - // import crate::shared::header::HeaderDropDownMenu; - import crate::shared::search_bar::SearchBar; import crate::shared::custom_button::CustomButton; - import crate::shared::cbutton::CButton; + IMG_DEFAULT_AVATAR = dep("crate://self/resources/img/default_avatar.png") + IMG_FAVORITES = dep("crate://self/resources/img/favorites.png") + IMG_MY_POSTS = dep("crate://self/resources/img/my-posts.png") + IMG_STICKER_GALLERY = dep("crate://self/resources/img/sticker-gallery.png") + IMG_SETTINGS = dep("crate://self/resources/img/settings.png") + IMG_QR = dep("crate://self/resources/img/qr_icon.png") Counter = {{Counter}} { view: { width: Fill, height: Fit - flow: Down, spacing: 10. - - show_bg: true, + spacing: 10. draw_bg: { - color: #ddd + color: #000 } - // {} - - body = { - - flow: Down, - spacing: 20, + CounterInfo = { + width: Fill, height: Fill + flow: Right, + spacing: 10., align: { x: 0.5, y: 0.5 }, - - avatar = { - source: (LOGO_MAKEPAD), - width: 300., height: 80. + show_bg: true + draw_bg: { + color: #fff } - button1 = { - button = { - width: Fit, height: Fit, margin: 0 - text: "Hello world" - // draw_bg: { - // border_radius: 0. - // } - } - } - // button1 =