Exchanges widget tuning

This commit is contained in:
felixrojauro
2015-11-30 14:01:23 +01:00
parent b091799d44
commit 9e2c8f331a
5 changed files with 135 additions and 84 deletions

View File

@@ -10,6 +10,12 @@
<height>600</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>800</width>
<height>480</height>
</size>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
@@ -38,27 +44,17 @@
<enum>QFrame::Sunken</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="2" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayoutExchanges"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblExchangesHeader">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>

View File

@@ -68,14 +68,13 @@ QWidget* GUIExchangesWidget::dockQmlToWidget()
m_pExchangesControl = pRootObject->findChild<GUIExchangesControl*>();
if ( m_pExchangesControl )
{
m_pExchangesControl->setWidth( 500 );
m_pExchangesControl->setHeight( 200 );
}
}
pPlaceHolder = QWidget::createWindowContainer( pExchangesWindow, this );
if ( pPlaceHolder )
{
pPlaceHolder->setMinimumSize( 500, 200 );
pPlaceHolder->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
}
}

View File

@@ -6,27 +6,15 @@ GUIExchangesControl
id: id_ExchangesControl
property color colorBackgroundInWidget: GUI20Skin.colorFrameBackground
Rectangle
{
id: id_ExchangessArea
height: id_ExchangesControl.height
width: id_ExchangesControl.width
color: colorBackgroundInWidget
z: -1
anchors.fill: id_ExchangesControl
// anchors.horizontalCenter: id_ExchangesControl.horizontalCenter
// anchors.left: id_leftArrow.left
QmlGUIExchangesListView
{
id: id_ExchangesListView
anchors.fill: id_ExchangessArea
anchors.fill: id_ExchangesControl
Component.onCompleted:
{
id_ExchangesControl.initializeExchangesView( id_ExchangesListView )
}
}
}
}

View File

@@ -14,14 +14,12 @@ GUIExchangesListView
ScrollView
{
id: id_ExchangesScrollView
anchors.fill: parent
anchors.fill: id_ExchangesView
ListView
{
id: id_listView
anchors.fill: id_ExchangesScrollView
height: 250
width: 500
clip: true
visible: true
interactive: contentHeight > id_listView.height ? true : false
@@ -39,7 +37,7 @@ GUIExchangesListView
id: id_listElement
objectName: id_ExchangesView.objectName + "_Element" + index
width: 750
width: id_ExchangesView.width
height: 125
Row
{
@@ -91,6 +89,7 @@ GUIExchangesListView
id: id_exchangeNameText
anchors.fill: id_exchangeNameRectangle
text: qsTr( m_exchangeName )
color: GUI20Skin.colorToolbarMainGradientEnd
}
}
Rectangle
@@ -109,9 +108,18 @@ GUIExchangesListView
height: id_pricesRectangle.height
Text
{
id: id_priceBidText
anchors.fill: id_priceBid
text: qsTr("Bid: %1").arg(m_bidPrice)
id: id_priceBidTextDescription
anchors.left: id_priceBid.left
text: qsTr("Bid:")
width: id_priceBid.width / 3
color: GUI20Skin.colorToolbarMainGradientEnd
}
Text
{
id: id_priceBidTextValue
anchors.left: id_priceBidTextDescription.right
text: qsTr( m_bidPrice )
color: GUI20Skin.colorTextActive
}
}
Rectangle
@@ -119,51 +127,100 @@ GUIExchangesListView
id: id_priceAsk
width: id_pricesRectangle.width / 4
height: id_pricesRectangle.height
Text
{
id: id_priceAskText
anchors.fill: id_priceAsk
text: qsTr("Ask: %1").arg(m_askPrice)
id: id_priceAskTextDescription
anchors.left: id_priceAsk.left
text: qsTr("Ask:")
color: GUI20Skin.colorToolbarMainGradientEnd
width: id_priceAsk.width / 3
}
Text
{
id: id_priceAskTextValue
anchors.left: id_priceAskTextDescription.right
text: qsTr( m_askPrice )
color: GUI20Skin.colorTextActive
}
}
Rectangle
{
id: id_volume24h
width: id_pricesRectangle.width / 2
height: id_pricesRectangle.height
Text
{
id: id_volume24hTextDescription
anchors.left: id_volume24h.left
text: qsTr("24h Volume:")
color: GUI20Skin.colorToolbarMainGradientEnd
width: id_volume24h.width / 3
}
Text
{
id: id_volume24hTextValue
anchors.left: id_volume24hTextDescription.right
text: qsTr( m_volume24H )
color: GUI20Skin.colorTextActive
}
}
}
}
Rectangle
{
id: id_volumeTimeRectangle
width: id_otherInfoRectangle.width
height: id_otherInfoRectangle.height / 4
Row
{
id: id_volumeTimeRow
anchors.fill: id_volumeTimeRectangle
Rectangle
{
id: id_priceLast
width: id_pricesRectangle.width / 4
height: id_pricesRectangle.height
Text
{
id: id_priceLastText
anchors.fill: id_priceLast
text: qsTr("Last: %1").arg(m_lastPrice)
id: id_priceLastTextDescription
anchors.left: id_priceLast.left
text: qsTr("Last:")
color: GUI20Skin.colorToolbarMainGradientEnd
width: id_priceLast.width / 3
}
}
Rectangle
{
id: id_volume24h
width: id_pricesRectangle.width / 4
height: id_pricesRectangle.height
Text
{
id: id_volume24hText
anchors.fill: id_volume24h
text: qsTr("Volume: %1").arg(m_volume24H)
}
}
id: id_priceLastTextValue
anchors.left: id_priceLastTextDescription.right
text: qsTr( m_lastPrice )
color: GUI20Skin.colorTextActive
}
}
Rectangle
{
id: id_exchangeLastUpdateTime
width: id_otherInfoRectangle.width
height: id_otherInfoRectangle.height / 4
width: id_volumeTimeRectangle.width / 4
height: id_volumeTimeRectangle.height
Text
{
id: id_exchangeTime
anchors.fill: id_exchangeLastUpdateTime
id: id_exchangeTimeDescription
anchors.left: id_exchangeLastUpdateTime.left
text: qsTr( "Time:" )
color: GUI20Skin.colorToolbarMainGradientEnd
width: id_exchangeLastUpdateTime.width / 3
}
Text
{
id: id_exchangeTimeValue
anchors.left: id_exchangeTimeDescription.right
text: qsTr( m_lastUpdateTime )
color: GUI20Skin.colorTextActive
}
}
}
}
Rectangle
{
id: id_exchangeLink
@@ -174,14 +231,25 @@ GUIExchangesListView
id: id_exchangeLinkText
anchors.fill: id_exchangeLink
text: qsTr( "Go to site" )
font.underline: true
color: GUI20Skin.colorToolbarMainGradientEnd
MouseArea
{
id: id_linkMouseArea
anchors.fill: id_exchangeLinkText
hoverEnabled: true
onClicked:
{
id_ExchangesView.onClicked( index )
}
onEntered:
{
id_exchangeLinkText.color = GUI20Skin.colorTextActive
}
onExited:
{
id_exchangeLinkText.color = GUI20Skin.colorToolbarMainGradientEnd
}
}
}
}

View File

@@ -2,15 +2,15 @@ import QtQuick 2.2
Rectangle
{
id: id_root
id: id_ExchangesRoot
width: parent ? parent.width : 0
height: parent ? parent.height : 0
color: GUI20Skin.colorFrameBackground
QmlGUIExchangesControl
{
id: id_ExchangesControlMain
anchors.fill: id_ExchangesRoot
}
width: 500
height: 250
color: GUI20Skin.colorFrameBackground
}