From 98221936448cdcf757576acbb257049eca826331 Mon Sep 17 00:00:00 2001 From: Vladyslav Stelmakhovskyi Date: Wed, 29 Mar 2017 14:41:18 +0200 Subject: [PATCH] Set z-order of comboboxes to make sure lowest will no overlap higher ones --- .../tablet/tabletWindows/preferences/Section.qml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/interface/resources/qml/hifi/tablet/tabletWindows/preferences/Section.qml b/interface/resources/qml/hifi/tablet/tabletWindows/preferences/Section.qml index 3d6dfa10ce..9dd0956000 100644 --- a/interface/resources/qml/hifi/tablet/tabletWindows/preferences/Section.qml +++ b/interface/resources/qml/hifi/tablet/tabletWindows/preferences/Section.qml @@ -89,14 +89,17 @@ Preference { if (categoryPreferences) { console.log("Category " + root.name + " with " + categoryPreferences.length + " preferences"); for (var j = 0; j < categoryPreferences.length; ++j) { - buildPreference(categoryPreferences[j]); + //provide component position within column + //lowest numbers on top + buildPreference(categoryPreferences[j], j); } } } - function buildPreference(preference) { + function buildPreference(preference, itemNum) { console.log("\tPreference type " + preference.type + " name " + preference.name) var builder; + var zpos; switch (preference.type) { case Preference.Editable: checkBoxCount = 0; @@ -136,11 +139,14 @@ Preference { case Preference.ComboBox: checkBoxCount = 0; builder = comboBoxBuilder; + //make sure that combo boxes sitting higher will have higher z coordinate + //to be not overlapped when drop down is active + zpos = root.z + 1000 - itemNum break; }; if (builder) { - preferences.push(builder.createObject(contentContainer, { preference: preference, isFirstCheckBox: (checkBoxCount === 1) })); + preferences.push(builder.createObject(contentContainer, { preference: preference, isFirstCheckBox: (checkBoxCount === 1) , z: zpos})); } } }