mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 21:56:15 +02:00
* canRez(Tmp)Certified() * CertifiedItem beginnings * Skeleton of verifyOwnerChallenge() * Controlled failure; updateLocation() skeletion * Controlled failure on checkout page with ctrl+f * Skeleton Purchases first-use tutorial * Initial progress on new setup * Security pic tip * Skeleton Certificate page * Updates to Certificate * General progress; setup is nearly complete * Better buttons; last step almost done * Initial progress on wallet home * Completed recent transactions * Security page * Scrollbar * Fix auth error text * PassphraseSelection * Change security pic * Minor layout changes; beginnings of emulated header * Various layout changes; wallet nav bar * Help screen * Quick onaccepted change * First pass at new purchases * Small style updates * Some error progress * Lightbox in purchases * Collapse other help answers when clicking on another * REZZED notif * Commerce Lightbox * Lots of new interactions in Purchases * Hook up 'view certificate' * Fix errors, fix close button on cert * Purchases timer; much faster filter * Add debugCheckout * Purchase updates * GlyphButton; separator; Checkout Success; Ledger fix; debug modes * Lock glyph below security pic should be white * Various fixes, round 1 * Circular mask * Passphrase change button fix; TextField error edge highlighting * Recent Activity fixes * Various changes * Standard Security Pic location * Color changes * Filter bar changes * Styling for multiple owned items * Minor language change * Header dropdown (harder than expected) * Small fixes * View backup instructions * marketplaces.js onCommerceScreen * Beginnign of new injection * Marketplace injection changes * Purchase button style changes * More button styling * MY PURCHASES button * marketplace onUsernameChanged * New help QA * Help text changes etc * Downscale security image, reducing filesize * Lots of bugfixes * Cleanup before PR * Only open cert during inspection if commerce switch is on * Help text changes * Purchase status incl. change to confirmed; Help text; Open Explorer to hifikey * Quick glyph change * New 'wallet not set up' flow for when entering Purchases or Checkout without set-up wallet
104 lines
3.8 KiB
QML
104 lines
3.8 KiB
QML
//
|
|
// Button.qml
|
|
//
|
|
// Created by David Rowe on 16 Feb 2016
|
|
// Copyright 2016 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
import QtQuick 2.5
|
|
import QtQuick.Controls 1.4 as Original
|
|
import QtQuick.Controls.Styles 1.4
|
|
|
|
import "../styles-uit"
|
|
|
|
Original.Button {
|
|
id: root;
|
|
|
|
property int color: 0
|
|
property int colorScheme: hifi.colorSchemes.light
|
|
property string buttonGlyph: "";
|
|
|
|
width: 120
|
|
height: hifi.dimensions.controlLineHeight
|
|
|
|
HifiConstants { id: hifi }
|
|
|
|
style: ButtonStyle {
|
|
|
|
background: Rectangle {
|
|
radius: hifi.buttons.radius
|
|
|
|
border.width: (control.color === hifi.buttons.none ||
|
|
(control.color === hifi.buttons.noneBorderless && control.hovered) ||
|
|
(control.color === hifi.buttons.noneBorderlessWhite && control.hovered) ||
|
|
(control.color === hifi.buttons.noneBorderlessGray && control.hovered)) ? 1 : 0;
|
|
border.color: control.color === hifi.buttons.noneBorderless ? hifi.colors.blueHighlight :
|
|
(control.color === hifi.buttons.noneBorderlessGray ? hifi.colors.baseGray : hifi.colors.white);
|
|
|
|
gradient: Gradient {
|
|
GradientStop {
|
|
position: 0.2
|
|
color: {
|
|
if (!control.enabled) {
|
|
hifi.buttons.disabledColorStart[control.colorScheme]
|
|
} else if (control.pressed) {
|
|
hifi.buttons.pressedColor[control.color]
|
|
} else if (control.hovered) {
|
|
hifi.buttons.hoveredColor[control.color]
|
|
} else {
|
|
hifi.buttons.colorStart[control.color]
|
|
}
|
|
}
|
|
}
|
|
GradientStop {
|
|
position: 1.0
|
|
color: {
|
|
if (!control.enabled) {
|
|
hifi.buttons.disabledColorFinish[control.colorScheme]
|
|
} else if (control.pressed) {
|
|
hifi.buttons.pressedColor[control.color]
|
|
} else if (control.hovered) {
|
|
hifi.buttons.hoveredColor[control.color]
|
|
} else {
|
|
hifi.buttons.colorFinish[control.color]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
label: Item {
|
|
HiFiGlyphs {
|
|
id: buttonGlyph;
|
|
visible: root.buttonGlyph !== "";
|
|
text: root.buttonGlyph === "" ? hifi.glyphs.question : root.buttonGlyph;
|
|
// Size
|
|
size: 34;
|
|
// Anchors
|
|
anchors.right: buttonText.left;
|
|
anchors.top: parent.top;
|
|
anchors.bottom: parent.bottom;
|
|
// Style
|
|
color: enabled ? hifi.buttons.textColor[control.color]
|
|
: hifi.buttons.disabledTextColor[control.colorScheme];
|
|
// Alignment
|
|
horizontalAlignment: Text.AlignHCenter;
|
|
verticalAlignment: Text.AlignVCenter;
|
|
}
|
|
RalewayBold {
|
|
id: buttonText;
|
|
anchors.centerIn: parent;
|
|
font.capitalization: Font.AllUppercase
|
|
color: enabled ? hifi.buttons.textColor[control.color]
|
|
: hifi.buttons.disabledTextColor[control.colorScheme]
|
|
size: hifi.fontSizes.buttonLabel
|
|
verticalAlignment: Text.AlignVCenter
|
|
horizontalAlignment: Text.AlignHCenter
|
|
text: control.text
|
|
}
|
|
}
|
|
}
|
|
}
|