Skip to content

Commit 44eca00

Browse files
committed
remove dependency on EasyApp footer. Implement locally
1 parent 0de292f commit 44eca00

4 files changed

Lines changed: 104 additions & 2 deletions

File tree

EasyReflectometryApp/Gui/Pages/Analysis/Layout.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import EasyApp.Gui.Globals as EaGlobals
77
import EasyApp.Gui.Elements as EaElements
88
import EasyApp.Gui.Components as EaComponents
99

10+
import Gui as Gui
1011
import Gui.Globals as Globals
1112

1213

@@ -25,7 +26,7 @@ EaComponents.ContentPage {
2526
]
2627
}
2728

28-
sideBar: EaComponents.SideBar {
29+
sideBar: Gui.SideBarWithFooter {
2930
tabs: [
3031
EaElements.TabButton { text: qsTr("Basic controls") },
3132
EaElements.TabButton { text: qsTr("Extra controls") } //; enabled: Globals.Proxies.main.analysis.defined }
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// SPDX-FileCopyrightText: 2026 EasyReflectometry contributors <support@easyreflectometry.org>
2+
// SPDX-License-Identifier: BSD-3-Clause
3+
// © 2026 Contributors to the EasyReflectometry project <https://github.com/easyscience/EasyReflectometry>
4+
5+
import QtQuick
6+
import QtQuick.Controls
7+
import QtQuick.Controls.Material
8+
9+
import EasyApp.Gui.Style as EaStyle
10+
import EasyApp.Gui.Animations as EaAnimations
11+
import EasyApp.Gui.Elements as EaElements
12+
13+
Item {
14+
id: sideBarContainer
15+
16+
property alias tabs: tabs.contentData
17+
property alias items: items.contentData
18+
19+
property alias continueButton: continueButton
20+
property Component footerComponent: null
21+
22+
anchors.fill: parent
23+
24+
// Sidebar tabs
25+
EaElements.TabBar {
26+
id: tabs
27+
28+
anchors.top: sideBarContainer.top
29+
anchors.left: sideBarContainer.left
30+
anchors.right: sideBarContainer.right
31+
}
32+
// Sidebar tabs
33+
34+
// Sidebar content
35+
SwipeView {
36+
id: items
37+
38+
anchors.top: tabs.bottom
39+
anchors.bottom: footerLoader.top
40+
anchors.left: sideBarContainer.left
41+
anchors.right: sideBarContainer.right
42+
43+
anchors.bottomMargin: EaStyle.Sizes.fontPixelSize
44+
45+
clip: true
46+
interactive: false
47+
48+
currentIndex: tabs.currentIndex
49+
}
50+
// Sidebar content
51+
52+
// Footer content (pinned above continue button)
53+
Loader {
54+
id: footerLoader
55+
56+
active: sideBarContainer.footerComponent !== null
57+
sourceComponent: sideBarContainer.footerComponent
58+
59+
anchors.bottom: continueButton.visible ? continueButton.top : sideBarContainer.bottom
60+
anchors.horizontalCenter: sideBarContainer.horizontalCenter
61+
62+
anchors.bottomMargin: footerLoader.item ? 0.25 * EaStyle.Sizes.fontPixelSize : 0
63+
}
64+
// Footer content
65+
66+
// Continue button
67+
EaElements.SideBarButton {
68+
id: continueButton
69+
70+
showBackground: false
71+
72+
anchors.bottom: sideBarContainer.bottom
73+
anchors.horizontalCenter: sideBarContainer.horizontalCenter
74+
75+
anchors.bottomMargin: 0.5 * EaStyle.Sizes.fontPixelSize
76+
77+
fontIcon: "arrow-circle-right"
78+
text: qsTr("Continue")
79+
}
80+
// Continue button
81+
82+
// Gradient area above button
83+
Rectangle {
84+
height: 1.25 * EaStyle.Sizes.fontPixelSize
85+
anchors.bottom: footerLoader.top
86+
anchors.left: sideBarContainer.left
87+
anchors.right: sideBarContainer.right
88+
89+
anchors.bottomMargin: 0.85 * EaStyle.Sizes.fontPixelSize
90+
anchors.leftMargin: EaStyle.Sizes.fontPixelSize
91+
anchors.rightMargin: EaStyle.Sizes.fontPixelSize
92+
93+
gradient: Gradient{
94+
GradientStop{ position : 0.0; color: `${EaStyle.Colors.contentBackground}`.replace('#', '#00')}
95+
GradientStop{ position : 1.0; color: `${EaStyle.Colors.contentBackground}`.replace('#', '#ff')}
96+
}
97+
}
98+
// Gradient area above button
99+
100+
}

EasyReflectometryApp/Gui/qmldir

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ module Gui
22

33
ApplicationWindow ApplicationWindow.qml
44
PlotControlRefLines PlotControlRefLines.qml
5+
SideBarWithFooter SideBarWithFooter.qml
56
SldChart SldChart.qml
67
StatusBar StatusBar.qml

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ classifiers = [
3131

3232
requires-python = '>=3.11'
3333
dependencies = [
34-
'EasyApp @ git+https://github.com/EasyScience/EasyApp.git@footer_component',
34+
'EasyApp @ git+https://github.com/EasyScience/EasyApp.git@develop',
3535
'easyreflectometry @ git+https://github.com/EasyScience/EasyReflectometryLib.git@develop',
3636
'asteval',
3737
'PySide6',

0 commit comments

Comments
 (0)