summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2021-03-04 06:41:40 -0500
committerAndreas Kling <kling@serenityos.org>2021-03-07 15:41:32 +0100
commit1ccf9de6b9c10013dea663bc6315b8b819bcb478 (patch)
tree1c28f5bae41735736f66cc98b18c44cf289d72d1 /Userland
parent2d7d5f2b55cc46eef7383e66cda9fa318b732cc4 (diff)
downloadserenity-1ccf9de6b9c10013dea663bc6315b8b819bcb478.zip
Serendipity: Couple more tips and some clean-up
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/Serendipity/SerendipityWidget.cpp3
-rw-r--r--Userland/Applications/Serendipity/SerendipityWindow.gml3
-rw-r--r--Userland/Applications/Serendipity/main.cpp13
3 files changed, 14 insertions, 5 deletions
diff --git a/Userland/Applications/Serendipity/SerendipityWidget.cpp b/Userland/Applications/Serendipity/SerendipityWidget.cpp
index 2f731a8bfe..6632d5230d 100644
--- a/Userland/Applications/Serendipity/SerendipityWidget.cpp
+++ b/Userland/Applications/Serendipity/SerendipityWidget.cpp
@@ -31,10 +31,8 @@
#include <LibGUI/Button.h>
#include <LibGUI/CheckBox.h>
#include <LibGUI/Label.h>
-#include <LibGUI/Layout.h>
#include <LibGUI/SeparatorWidget.h>
#include <LibGfx/FontDatabase.h>
-#include <LibGfx/Painter.h>
#include <LibGfx/Palette.h>
#include <LibMarkdown/Document.h>
#include <LibWeb/OutOfProcessWebView.h>
@@ -50,7 +48,6 @@ SerendipityWidget::SerendipityWidget()
banner_label.set_icon(Gfx::Bitmap::load_from_file("/res/graphics/welcome-serendipity.png"));
auto& navigation_column = *find_descendant_of_type_named<GUI::Widget>("navigation_column");
- navigation_column.layout()->add_spacer();
auto& nav_separator = navigation_column.add<GUI::SeparatorWidget>(Gfx::Orientation::Horizontal);
nav_separator.set_max_height(2);
diff --git a/Userland/Applications/Serendipity/SerendipityWindow.gml b/Userland/Applications/Serendipity/SerendipityWindow.gml
index be5789fd59..e0ed21deb7 100644
--- a/Userland/Applications/Serendipity/SerendipityWindow.gml
+++ b/Userland/Applications/Serendipity/SerendipityWindow.gml
@@ -98,6 +98,9 @@
text: "Next Tip"
}
+ @GUI::Widget {
+ }
+
}
}
diff --git a/Userland/Applications/Serendipity/main.cpp b/Userland/Applications/Serendipity/main.cpp
index 260223ae07..b176dd12f6 100644
--- a/Userland/Applications/Serendipity/main.cpp
+++ b/Userland/Applications/Serendipity/main.cpp
@@ -26,10 +26,16 @@
#include "SerendipityWidget.h"
#include <LibGUI/Application.h>
+#include <LibGUI/Icon.h>
#include <LibGUI/Window.h>
int main(int argc, char** argv)
{
+ if (pledge("stdio recvfd sendfd rpath unix proc accept exec fattr", nullptr) < 0) {
+ perror("pledge");
+ return 1;
+ }
+
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio recvfd sendfd rpath unix proc accept exec", nullptr) < 0) {
@@ -37,6 +43,8 @@ int main(int argc, char** argv)
return 1;
}
+ auto app_icon = GUI::Icon::default_icon("app-serendipity");
+
if (unveil("/res", "r") < 0) {
perror("unveil");
return 1;
@@ -63,11 +71,12 @@ int main(int argc, char** argv)
}
auto window = GUI::Window::construct();
- window->set_minimum_size(480, 250);
+ window->resize(480, 250);
window->center_on_screen();
window->set_title("Welcome");
- window->set_resizable(true);
+ window->set_minimum_size(480, 250);
+ window->set_icon(app_icon.bitmap_for_size(16));
window->set_main_widget<SerendipityWidget>();
window->show();