Commit e73025d5 authored by Samikshan Bairagya's avatar Samikshan Bairagya

Prevent category view and sky-object listview from overlapping when window...

Prevent category view and sky-object listview from overlapping when window width is decreased. The QDockWidget showing the WI QML interface has no limitations on width.Also fix minor bugs introduced in previous commit.
parent a063ce24
...@@ -322,7 +322,7 @@ void KStars::showWI(ObsConditions *obs) ...@@ -322,7 +322,7 @@ void KStars::showWI(ObsConditions *obs)
wiDock->setObjectName("What's Interesting"); wiDock->setObjectName("What's Interesting");
wiDock->setAllowedAreas(Qt::RightDockWidgetArea); wiDock->setAllowedAreas(Qt::RightDockWidgetArea);
wiDock->setWidget(wi->getWIBaseView()); wiDock->setWidget(wi->getWIBaseView());
wiDock->setFixedWidth(wi->getWIBaseView()->width()); // wiDock->setMinimumSize(wi->getWIBaseView()->size());
addDockWidget(Qt::RightDockWidgetArea, wiDock); addDockWidget(Qt::RightDockWidgetArea, wiDock);
wiDock->setVisible(true); wiDock->setVisible(true);
} }
......
...@@ -24,7 +24,7 @@ Rectangle { ...@@ -24,7 +24,7 @@ Rectangle {
width: 209 width: 209
height: 46 height: 46
color: "#59ad0e" color: "#59ad0e"
text: i18n("What's Interesting...") text: qsTr("What's Interesting...")
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
font.family: "Cantarell" font.family: "Cantarell"
font.bold: false font.bold: false
...@@ -68,6 +68,8 @@ Rectangle { ...@@ -68,6 +68,8 @@ Rectangle {
color: "#00060b" color: "#00060b"
radius: 12 radius: 12
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
opacity: 0.500 opacity: 0.500
border.width: 4 border.width: 4
border.color: "black" border.color: "black"
...@@ -90,7 +92,7 @@ Rectangle { ...@@ -90,7 +92,7 @@ Rectangle {
x: 0 x: 0
y: 0 y: 0
color: "#e4800d" color: "#e4800d"
text: i18n("Planets") text: qsTr("Planets")
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
...@@ -187,11 +189,13 @@ Rectangle { ...@@ -187,11 +189,13 @@ Rectangle {
Rectangle { Rectangle {
id: dsoContainer id: dsoContainer
x: 35
y: 172 y: 172
width: 283
height: 166 height: 166
color: "#00000000" color: "#00000000"
anchors.right: parent.right
anchors.rightMargin: 35
anchors.left: parent.left
anchors.leftMargin: 35
Rectangle { Rectangle {
id: dsoRect id: dsoRect
...@@ -209,7 +213,7 @@ Rectangle { ...@@ -209,7 +213,7 @@ Rectangle {
x: 0 x: 0
y: 0 y: 0
color: "#e4800d" color: "#e4800d"
text: i18n("Deep-sky Objects") text: qsTr("Deep-sky Objects")
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
...@@ -243,7 +247,7 @@ Rectangle { ...@@ -243,7 +247,7 @@ Rectangle {
x: 0 x: 0
y: 0 y: 0
color: "#6b6660" color: "#6b6660"
text: i18n("Galaxies") text: qsTr("Galaxies")
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
...@@ -350,6 +354,8 @@ Rectangle { ...@@ -350,6 +354,8 @@ Rectangle {
id: skyObjView id: skyObjView
width: parent.width width: parent.width
height: parent.height height: parent.height
anchors.leftMargin: categoryView.width
// anchors.leftMargin: 370
anchors.left: categoryView.right anchors.left: categoryView.right
...@@ -357,15 +363,15 @@ Rectangle { ...@@ -357,15 +363,15 @@ Rectangle {
front: Rectangle { front: Rectangle {
id: soListContainer id: soListContainer
height: parent.height
color: "transparent" color: "transparent"
width: parent.width anchors.fill: parent
Rectangle { Rectangle {
id: soListViewBackground id: soListViewBackground
anchors.fill: soListViewContainer anchors.fill: soListViewContainer
color: "#00060b" color: "#00060b"
opacity: 0.5 opacity: 0.5
radius: 12
} }
Rectangle { Rectangle {
...@@ -1310,7 +1316,7 @@ Rectangle { ...@@ -1310,7 +1316,7 @@ Rectangle {
PropertyChanges { PropertyChanges {
target: viewsRow target: viewsRow
x: -(container.width) x: -(2*categoryView.width)
y: 0 y: 0
anchors.topMargin: 0 anchors.topMargin: 0
anchors.bottomMargin: 0 anchors.bottomMargin: 0
...@@ -1326,7 +1332,7 @@ Rectangle { ...@@ -1326,7 +1332,7 @@ Rectangle {
PropertyChanges { PropertyChanges {
target: viewsRow target: viewsRow
x: -(container.width) x: -(2*categoryView.width)
y: 0 y: 0
anchors.topMargin: 0 anchors.topMargin: 0
anchors.bottomMargin: 0 anchors.bottomMargin: 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment