mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-21 10:19:04 +02:00
Switch ControlMappingScreen to a two-pane layout
This commit is contained in:
1 parent
1d23a58a4e
commit
2c75946e6c
4 files changed
+55
-44
No files matched your search
@@ -36,9 +36,17 @@ void UITwoPaneBaseDialogScreen::CreateViews() {
|
||||
|
||||
BeforeCreateViews();
|
||||
|
||||
auto createContentViews = [this](UI::ViewGroup *parent) {
|
||||
auto createContentViews = [this, portrait](UI::ViewGroup *parent) {
|
||||
if (flags_ & TwoPaneFlags::ContentsCanScroll) {
|
||||
ScrollView *contentScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f, Margins(8)));
|
||||
Margins margins(8, 8, 8, 0);
|
||||
if (flags_ & TwoPaneFlags::SettingsToTheRight) {
|
||||
// If settings are in context menu, we want to avoid double margins on the sides.
|
||||
margins.left = 0;
|
||||
} else {
|
||||
margins.right = 0;
|
||||
}
|
||||
|
||||
ScrollView *contentScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f, margins));
|
||||
parent->Add(contentScroll);
|
||||
CreateContentViews(contentScroll);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user