mirror of https://github.com/buggins/dlangui.git
fix scroll issue; settings dialog improvements
This commit is contained in:
parent
4d62cdd359
commit
9d52514295
|
@ -191,8 +191,8 @@ class SettingsDialog : Dialog {
|
||||||
_tree.selectionListener = &onTreeItemSelected;
|
_tree.selectionListener = &onTreeItemSelected;
|
||||||
_tree.fontSize = 16;
|
_tree.fontSize = 16;
|
||||||
_frame = new FrameLayout("prop_pages");
|
_frame = new FrameLayout("prop_pages");
|
||||||
_frame.minHeight(200).minWidth(100).layoutHeight(FILL_PARENT).layoutHeight(FILL_PARENT);
|
|
||||||
_frame.styleId = STYLE_SETTINGS_PAGES;
|
_frame.styleId = STYLE_SETTINGS_PAGES;
|
||||||
|
_frame.minHeight(200).minWidth(100).layoutHeight(FILL_PARENT).layoutHeight(FILL_PARENT);
|
||||||
createControls(_layout, _tree.items);
|
createControls(_layout, _tree.items);
|
||||||
HorizontalLayout content = new HorizontalLayout("settings_dlg_content");
|
HorizontalLayout content = new HorizontalLayout("settings_dlg_content");
|
||||||
content.addChild(_tree);
|
content.addChild(_tree);
|
||||||
|
@ -202,6 +202,7 @@ class SettingsDialog : Dialog {
|
||||||
addChild(createButtonsPanel([ACTION_APPLY, ACTION_CANCEL], 0, 0));
|
addChild(createButtonsPanel([ACTION_APPLY, ACTION_CANCEL], 0, 0));
|
||||||
if (_layout.childCount > 0)
|
if (_layout.childCount > 0)
|
||||||
_tree.selectItem(_layout.child(0).id);
|
_tree.selectItem(_layout.child(0).id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -375,7 +375,7 @@ class ScrollWidget : ScrollWidgetBase {
|
||||||
if (_contentWidget) {
|
if (_contentWidget) {
|
||||||
Point sz = fullContentSize();
|
Point sz = fullContentSize();
|
||||||
Point p = scrollPos;
|
Point p = scrollPos;
|
||||||
_contentWidget.layout(Rect(_pos.left - p.x, _pos.top - p.y, _pos.left + sz.x - p.x, _pos.top + sz.y - p.y));
|
_contentWidget.layout(Rect(_clientRect.left - p.x, _clientRect.top - p.y, _clientRect.left + sz.x - p.x, _clientRect.top + sz.y - p.y));
|
||||||
_contentWidget.onDraw(buf);
|
_contentWidget.onDraw(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,21 +362,25 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style id="SETTINGS_TREE"
|
<style id="SETTINGS_TREE"
|
||||||
margins="8,8,8,8"
|
margins="4,4,4,4"
|
||||||
padding="4,4,4,4"
|
padding="4,4,4,4"
|
||||||
backgroundColor="#FFFFFF"
|
backgroundColor="#FFFFFF"
|
||||||
|
layoutWeight="3"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style id="SETTINGS_PAGES"
|
<style id="SETTINGS_PAGES"
|
||||||
margins="0,8,8,8"
|
margins="0,4,4,4"
|
||||||
padding="4,4,4,4"
|
padding="4,4,4,4"
|
||||||
backgroundColor="#80FFFFFF"
|
backgroundColor="#80FFFFFF"
|
||||||
|
layoutWidth="FILL_PARENT"
|
||||||
|
layoutWeight="5"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style id="SETTINGS_PAGE_TITLE"
|
<style id="SETTINGS_PAGE_TITLE"
|
||||||
margins="4,4,4,14"
|
margins="4,4,4,14"
|
||||||
fontSize="18"
|
fontSize="18"
|
||||||
layoutWeight="0"
|
layoutWeight="0"
|
||||||
|
layoutWidth="FILL_PARENT"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style id="RESIZER_VERTICAL"
|
<style id="RESIZER_VERTICAL"
|
||||||
|
|
Loading…
Reference in New Issue