Skip to content

Commit

Permalink
Add splash to home screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Manga authored and Felipe Manga committed Dec 23, 2023
1 parent 99ab4df commit 596a7b1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion data/gui.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Aseprite | Copyright (C) 2001-2016 David Capello -->
<!-- LibreSprite | Copyright (C) 2017-2021 LibreSprite contributors -->
<gui version="1.1.8-dev">
<gui version="1.1-dev">
<!-- Keyboard shortcuts -->
<keyboard version="1">

Expand Down
Binary file added data/splash.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 16 additions & 20 deletions data/widgets/home_view.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
<!-- Aseprite | Copyright (C) 2001-2015 David Capello -->
<!-- LibreSprite | Copyright (C) 2021 LibreSprite contributors -->
<!-- LibreSprite | Copyright (C) 2023 LibreSprite contributors -->
<gui>
<vbox noborders="true" id="home_view" border="4" childspacing="2" expansive="true">
<hbox noborders="true" id="recover_sprites_placeholder">
<boxfiller />
<button id="recover_sprites" text="Recover Lost Sprites" border="8" />
<boxfiller />
</hbox>

<hbox noborders="true" id="header_placeholder">
<image file="icons/ase48.png" align="center" />
<vbox border="4" childspacing="4">
<image file="icons/ase48.png" align="center" />
<link id="new_file" text="New File..." style="workspace_link" />
<link id="open_file" text="Open File..." style="workspace_link" />
<hbox noborders="true" id="recover_sprites_placeholder">
<link id="recover_sprites" text="Recover Lost Sprites..." style="workspace_link" />
</hbox>
</vbox>
<boxfiller />
<image file="splash.png" id="splash" align="center" expansive="true"/>
<boxfiller />
</hbox>
<splitter horizontal="true" noborders="true" childspacing="2"
expansive="true" by="percetage" position="50" >
<splitter vertical="true" noborders="true" childspacing="2">
<vbox id="files_placeholder">
<label text="Recent files:" style="workspace_label" />
<view id="files_view" expansive="true" style="workspace_view" />
</vbox>
<vbox id="folders_placeholder">
<label text="Recent folders:" style="workspace_label" />
<view id="folders_view" expansive="true" style="workspace_view" />
</vbox>
</splitter>
<splitter horizontal="true" noborders="true" childspacing="2" expansive="true">
<vbox id="files_placeholder">
<label text="Recent files:" style="workspace_label" />
<view id="files_view" expansive="true" style="workspace_view" />
</vbox>
<vbox id="folders_placeholder">
<label text="Recent folders:" style="workspace_label" />
<view id="folders_view" expansive="true" style="workspace_view" />
</vbox>
</splitter>
</vbox>
</gui>
2 changes: 1 addition & 1 deletion src/app/ui/home_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void HomeView::onResize(ui::ResizeEvent& ev)
headerPlaceholder()->setVisible(ev.bounds().h > 200*ui::guiscale());
foldersPlaceholder()->setVisible(ev.bounds().h > 150*ui::guiscale());

ui::VBox::onResize(ev);
ui::Box::onResize(ev);
}

void HomeView::onRecoverSprites()
Expand Down
1 change: 1 addition & 0 deletions src/gen/ui_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ static std::string convert_type(const std::string& name)
if (name == "tipwindow") return "ui::TipWindow";
if (name == "vbox") return "ui::VBox";
if (name == "view") return "ui::View";
if (name == "image") return "ui::ImageView";
if (name == "window") return "ui::Window";
throw base::Exception("unknown widget name: " + name);
}
Expand Down

0 comments on commit 596a7b1

Please sign in to comment.