mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:47:44 +00:00
CrashReporter: Put backtrace TextEditor in a TabWidget
Since CrashReporter will be showing more info from coredumps soon, we need tabs to put those things somewhere! :^)
This commit is contained in:
parent
568cde5e23
commit
3718a16f59
2 changed files with 7 additions and 16 deletions
|
@ -58,21 +58,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::TabWidget {
|
||||||
fixed_height: 18
|
name: "tab_widget"
|
||||||
|
|
||||||
layout: @GUI::HorizontalBoxLayout {
|
|
||||||
}
|
|
||||||
|
|
||||||
@GUI::Label {
|
|
||||||
text: "Backtrace:"
|
|
||||||
text_alignment: "CenterLeft"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@GUI::TextEditor {
|
|
||||||
name: "backtrace_text_editor"
|
|
||||||
mode: "ReadOnly"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include <LibGUI/Label.h>
|
#include <LibGUI/Label.h>
|
||||||
#include <LibGUI/Layout.h>
|
#include <LibGUI/Layout.h>
|
||||||
#include <LibGUI/LinkLabel.h>
|
#include <LibGUI/LinkLabel.h>
|
||||||
|
#include <LibGUI/TabWidget.h>
|
||||||
#include <LibGUI/TextEditor.h>
|
#include <LibGUI/TextEditor.h>
|
||||||
#include <LibGUI/Window.h>
|
#include <LibGUI/Window.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -163,7 +164,10 @@ int main(int argc, char** argv)
|
||||||
Desktop::Launcher::open(URL::create_with_file_protocol(LexicalPath(coredump_path).dirname()));
|
Desktop::Launcher::open(URL::create_with_file_protocol(LexicalPath(coredump_path).dirname()));
|
||||||
};
|
};
|
||||||
|
|
||||||
auto& backtrace_text_editor = *widget.find_descendant_of_type_named<GUI::TextEditor>("backtrace_text_editor");
|
auto& tab_widget = *widget.find_descendant_of_type_named<GUI::TabWidget>("tab_widget");
|
||||||
|
|
||||||
|
auto& backtrace_text_editor = tab_widget.add_tab<GUI::TextEditor>("Backtrace");
|
||||||
|
backtrace_text_editor.set_mode(GUI::TextEditor::Mode::ReadOnly);
|
||||||
backtrace_text_editor.set_text(backtrace);
|
backtrace_text_editor.set_text(backtrace);
|
||||||
backtrace_text_editor.set_should_hide_unnecessary_scrollbars(true);
|
backtrace_text_editor.set_should_hide_unnecessary_scrollbars(true);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue