Merge branch 'master' of github.com:highfidelity/hifi into run

This commit is contained in:
Seth Alves 2018-01-09 08:48:06 -08:00
commit db307851f0
2 changed files with 23 additions and 7 deletions

View file

@ -12,10 +12,8 @@ function(JOIN VALUES GLUE OUTPUT)
endfunction() endfunction()
if (NOT DEV_BUILD) set(INTERFACE_QML_QRC ${CMAKE_CURRENT_BINARY_DIR}/qml.qrc)
set(INTERFACE_QML_QRC ${CMAKE_CURRENT_BINARY_DIR}/qml.qrc) generate_qrc(OUTPUT ${INTERFACE_QML_QRC} PATH ${CMAKE_CURRENT_SOURCE_DIR}/resources GLOBS *.qml *.qss *.js *.html *.ttf *.gif *.svg *.png *.jpg)
generate_qrc(OUTPUT ${INTERFACE_QML_QRC} PATH ${CMAKE_CURRENT_SOURCE_DIR}/resources GLOBS *.qml *.qss *.js *.html *.ttf *.gif *.svg *.png *.jpg)
endif()
# set a default root dir for each of our optional externals if it was not passed # set a default root dir for each of our optional externals if it was not passed
set(OPTIONAL_EXTERNALS "LeapMotion") set(OPTIONAL_EXTERNALS "LeapMotion")
@ -74,9 +72,7 @@ qt5_wrap_ui(QT_UI_HEADERS "${QT_UI_FILES}")
# add them to the interface source files # add them to the interface source files
set(INTERFACE_SRCS ${INTERFACE_SRCS} "${QT_UI_HEADERS}" "${QT_RESOURCES}") set(INTERFACE_SRCS ${INTERFACE_SRCS} "${QT_UI_HEADERS}" "${QT_RESOURCES}")
if (NOT DEV_BUILD)
list(APPEND INTERFACE_SRCS ${INTERFACE_QML_QRC}) list(APPEND INTERFACE_SRCS ${INTERFACE_QML_QRC})
endif()
if (UNIX) if (UNIX)
install( install(

View file

@ -127,9 +127,15 @@ Item {
GridView { GridView {
id: gridView id: gridView
keyNavigationEnabled: false keyNavigationEnabled: false
highlightFollowsCurrentItem: false highlightFollowsCurrentItem: false
property int previousGridIndex: -1 property int previousGridIndex: -1
// true if any of the buttons contains mouse
property bool containsMouse: false
anchors { anchors {
fill: parent fill: parent
topMargin: 20 topMargin: 20
@ -162,15 +168,29 @@ Item {
flow: GridView.LeftToRight flow: GridView.LeftToRight
model: page.proxyModel model: page.proxyModel
delegate: Item { delegate: Control {
id: wrapper id: wrapper
width: gridView.cellWidth width: gridView.cellWidth
height: gridView.cellHeight height: gridView.cellHeight
hoverEnabled: true
property bool containsMouse: gridView.containsMouse
onHoveredChanged: {
if (hovered && !gridView.containsMouse) {
gridView.containsMouse = true
} else {
gridView.containsMouse = false
}
}
property var proxy: modelData property var proxy: modelData
TabletButton { TabletButton {
id: tabletButton id: tabletButton
scale: wrapper.hovered ? 1.25 : wrapper.containsMouse ? 0.75 : 1.0
Behavior on scale { NumberAnimation { duration: 200; easing.type: Easing.Linear } }
anchors.centerIn: parent anchors.centerIn: parent
gridView: wrapper.GridView.view gridView: wrapper.GridView.view
buttonIndex: page.proxyModel.buttonIndex(uuid); buttonIndex: page.proxyModel.buttonIndex(uuid);