From 0a678e6f55f84d1fb061571ce5edd6ed9105f4aa Mon Sep 17 00:00:00 2001 From: hex Date: Sat, 8 Feb 2025 21:01:30 +0000 Subject: [PATCH 1/2] fix: input box triggering button --- src/gui/MainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 8ef0143..a76aa0c 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -47,8 +47,8 @@ MainWindow::MainWindow(void) BButton *connectButton = new BButton(Frame(), "connect", "Connect!", new BMessage(msgConnectButtonClicked)); connectButton->SetTarget(this); - BTextControl *jidInput = new BTextControl("jidinput", "JID:", "Placeholder", new BMessage(msgConnectButtonClicked)); - BTextControl *pwInput = new BTextControl("pwinput", "Password:", "Placeholder", new BMessage(msgConnectButtonClicked)); + BTextControl *jidInput = new BTextControl("jidinput", "JID:", "Placeholder", NULL); + BTextControl *pwInput = new BTextControl("pwinput", "Password:", "Placeholder", NULL); pwInput->TextView()->HideTyping(true); From 52a92b10653a6c587b93a2c3c1b67da76b3371e0 Mon Sep 17 00:00:00 2001 From: hex Date: Sat, 8 Feb 2025 21:06:39 +0000 Subject: [PATCH 2/2] fix: make contacts window also adopt sys colors --- src/gui/Contacts.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/Contacts.cpp b/src/gui/Contacts.cpp index 3276cb6..4973397 100644 --- a/src/gui/Contacts.cpp +++ b/src/gui/Contacts.cpp @@ -1,5 +1,7 @@ #include "Contacts.h" #include +#include +#include #include #include #include @@ -7,5 +9,10 @@ Contacts::Contacts(void) : BWindow(BRect(200,200,600,400), TITLE, B_TITLED_WINDOW, B_NOT_MINIMIZABLE | B_QUIT_ON_WINDOW_CLOSE) { - AddChild(new BStringView("label", "Placeholder label (contact list to be added)")); + BGroupLayout *group = new BGroupLayout(B_VERTICAL); + SetLayout(group); + + group->View()->AdoptSystemColors(); + + group->AddView(new BStringView("label", "Placeholder label (contact list to be added)")); }