forked from 1b-agent/opencadstudio-upstream
feat: add mobile sponsor banner
This commit is contained in:
1 parent
dd304a8424
commit
e2b37edd23
2 files changed
+19
-1
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 146 KiB |
+19
-1
@@ -35,6 +35,12 @@ pub(in crate::app) use overlay::{MTEXT_TEXT_ID, TEXT_INLINE_ID};
|
||||
pub(in crate::app) const VIEWPORT_CAPTURE_BOUNDS_ID: &str = "viewport-capture-bounds";
|
||||
|
||||
const VIEWCUBE_HIT_SIZE: f32 = VIEWCUBE_REGION_PX;
|
||||
static MOBILE_SPONSOR_IMAGE: std::sync::LazyLock<iced::widget::image::Handle> =
|
||||
std::sync::LazyLock::new(|| {
|
||||
iced::widget::image::Handle::from_bytes(
|
||||
include_bytes!("../../../assets/sponsors/cad-editor-mobile-dwg-viewer.jpeg").as_slice(),
|
||||
)
|
||||
});
|
||||
|
||||
/// Background used by drafting overlays in model or paper space.
|
||||
fn crosshair_background(tab: &DocumentTab, is_paper: bool) -> [f32; 4] {
|
||||
@@ -3497,6 +3503,18 @@ fn start_page_content<'a>(
|
||||
)
|
||||
.interaction(iced::mouse::Interaction::Pointer)
|
||||
.on_press(Message::OpenUrl("https://open-aec.com/".to_string())),
|
||||
mouse_area(
|
||||
container(
|
||||
iced::widget::image(MOBILE_SPONSOR_IMAGE.clone())
|
||||
.width(Fill)
|
||||
.content_fit(iced::ContentFit::Contain),
|
||||
)
|
||||
.width(Fill),
|
||||
)
|
||||
.interaction(iced::mouse::Interaction::Pointer)
|
||||
.on_press(Message::OpenUrl(
|
||||
"https://play.google.com/store/apps/details?id=net.cadeditor.app".to_string(),
|
||||
)),
|
||||
]
|
||||
.spacing(10)
|
||||
.align_x(iced::alignment::Horizontal::Center)
|
||||
@@ -3511,7 +3529,7 @@ fn start_page_content<'a>(
|
||||
container(secondary_row).center_x(Fill),
|
||||
Space::new().height(iced::Length::Fixed(10.0)),
|
||||
container(reddit_btn).center_x(Fill),
|
||||
Space::new().height(Fill),
|
||||
Space::new().height(iced::Length::Fixed(20.0)),
|
||||
sponsors,
|
||||
Space::new().height(iced::Length::Fixed(52.0)),
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user