mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
Welcome: Replace Label with Image component to show banner and app icon
This commit is contained in:
parent
d0411f3756
commit
d139df706a
1 changed files with 6 additions and 6 deletions
|
@ -24,6 +24,9 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "BackgroundWidget.h"
|
||||||
|
#include "TextWidget.h"
|
||||||
|
#include "UnuncheckableButton.h"
|
||||||
#include <AK/Optional.h>
|
#include <AK/Optional.h>
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <AK/StringBuilder.h>
|
#include <AK/StringBuilder.h>
|
||||||
|
@ -33,6 +36,7 @@
|
||||||
#include <LibGUI/BoxLayout.h>
|
#include <LibGUI/BoxLayout.h>
|
||||||
#include <LibGUI/Button.h>
|
#include <LibGUI/Button.h>
|
||||||
#include <LibGUI/Desktop.h>
|
#include <LibGUI/Desktop.h>
|
||||||
|
#include <LibGUI/Image.h>
|
||||||
#include <LibGUI/Label.h>
|
#include <LibGUI/Label.h>
|
||||||
#include <LibGUI/MessageBox.h>
|
#include <LibGUI/MessageBox.h>
|
||||||
#include <LibGUI/StackWidget.h>
|
#include <LibGUI/StackWidget.h>
|
||||||
|
@ -42,10 +46,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "BackgroundWidget.h"
|
|
||||||
#include "TextWidget.h"
|
|
||||||
#include "UnuncheckableButton.h"
|
|
||||||
|
|
||||||
struct ContentPage {
|
struct ContentPage {
|
||||||
String menu_name;
|
String menu_name;
|
||||||
String title;
|
String title;
|
||||||
|
@ -214,10 +214,10 @@ int main(int argc, char** argv)
|
||||||
title_box.set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
title_box.set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
||||||
|
|
||||||
if (!page.icon.is_empty()) {
|
if (!page.icon.is_empty()) {
|
||||||
auto& icon = title_box.add<GUI::Label>();
|
auto& icon = title_box.add<GUI::Image>();
|
||||||
icon.set_icon(Gfx::Bitmap::load_from_file(page.icon));
|
|
||||||
icon.set_preferred_size(16, 16);
|
icon.set_preferred_size(16, 16);
|
||||||
icon.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
|
icon.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
|
||||||
|
icon.load_from_file(page.icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto& content_title = title_box.add<GUI::Label>();
|
auto& content_title = title_box.add<GUI::Label>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue