Compare commits

...
Author SHA1 Message Date
Igor Sirotin 45d7d80755 fix(StatusPopupMenu): Removed custom properties 2022-08-10 15:02:14 +03:00
PavelS 7fc207f75f fix(StatusImageCropPanel) add margins to crop area (#848)
Needed for status-im/status-desktop#6835

Required by status-im/status-desktop#6872
2022-08-10 13:58:52 +03:00
MishkaRogachev caaa2fc53b fix(StatusCommunityTags): fix width calculation 2022-08-10 12:07:32 +03:00
PavelS 98aa6a4b27 fix(StatusTabButton) adjust tab button height (#842)
Needed by https://github.com/status-im/status-desktop/issues/6786
2022-08-09 18:27:15 +03:00
Lukáš Tinkl b3ceb0aad9 feat/(Status[Base]Button): add a new Primary variant
we were missing this variant, needed for status-im/status-desktop#6081
2022-08-09 10:53:27 +02:00
Lukáš Tinkl fa16c32316 chore(Palette): do not define font properties twice
sue a shared impl, they are common to both light/dark palettes
2022-08-09 10:53:27 +02:00
PavelS 4282cc10c4 fix(StatusImageCropPanel) adjust Image Crop component (#839)
- update StatusSlider handle and background positioning

Needed for https://github.com/status-im/status-desktop/issues/6835
2022-08-09 09:54:19 +03:00
Stefan e5ddf28f02 fix(tests): fix building tests 2022-08-09 01:07:17 +02:00
Stefan 4937681645 fix(StatusImageCrop): fix artefacts due to offscreen caching
Fix by disabling layering, leftover from the previous approach of not
using Canvas.

Also investigate TODO regarding artefacts workaround and implement
a proper approach

Fixes: #6640
2022-08-09 01:07:17 +02:00
Lukáš Tinkl 39b1bcfe6b hotfix(StatusDatePicker): fix some UI issues
- make selectedDate read/write for preselecting the date
- minor toolbar spacing/sizing fixes
2022-08-08 23:20:41 +02:00
Michał 56f36ed627 fix(StatusSeedPhraseInput): fix notifying inserting word done (#841) 2022-08-08 17:38:43 +02:00
Lukáš Tinkl 789b773649 feat(StatusDatePicker): introduce StatusDatePicker component
nothing fancy, just a combo box with a calendar popup; needed for the
discord import tool UI

Related to status-im/status-desktop#6081
2022-08-08 15:05:12 +02:00
MishkaRogachev ad962a6009 fix(StatusInput): Add labelPadding customization and improve height calculation 2022-08-08 15:58:31 +03:00
MishkaRogachev f09565a4fa fix(StatusBaseInput): placeholder text is also can be multiline 2022-08-08 14:20:20 +03:00
MishkaRogachev d08339a7b0 fix(StatusStackView): Use availableWidth for content 2022-08-08 14:20:20 +03:00
Michal Iskierko 5c24767310 feat(StatusColorRadioButton): expose radio button diameter property
Issue #5982
2022-08-08 10:29:12 +02:00
Jonathan Rainville 737b9cfb3f fix(StatusChatList): fix wrong id used 2022-08-05 15:57:24 -04:00
Stefan 10d312ec8f feature(StatusAddressPanel): Implement generic address display control
Provides frame, prefix icon and copy operation int addition to StatusAddress

Updates: #6798
2022-08-05 17:01:25 +02:00
PavelS 2a377533f8 fix(StatusImageCropPanel) vertically align slider in ImageCropPanel (#829)
- change StatusSlider to be vertically centered

Needed for https://github.com/status-im/status-desktop/issues/6725
2022-08-05 16:53:55 +03:00
Boris Melnik 25e3c5526a fix(handler): Remove handler include from sandbox (#834) 2022-08-05 12:21:34 +03:00
Michał 94e59e1bf0 chore(StatusChatList): Keep sync with underlying model after reordering (#825) 2022-08-04 21:52:56 +02:00
Alexandra Betouni 3ac0187923 fix(StatusBaseInput): added left margin between text and left component (#830)
Needed for https://github.com/status-im/status-desktop/issues/6730
2022-08-04 18:03:33 +03:00
Michał a563687bf5 chore(StatusChatList)!: Use SortFilterProxyModel instead of filtering functions (#823)
BREAKING CHANGE: StatusChatList has no longer filterFn, model is
intended to be already filtered externally
2022-08-04 14:52:12 +02:00
Boris Melnik 40992f6718 feat(hot reloading): Add first version of hot reloading (#674)
Version for: https://github.com/status-im/status-desktop/issues/5690
2022-08-04 13:54:13 +03:00
Anthony Laibe 9738890d9d feat(@StatusAppNavBar): Add qr scan button 2022-08-04 09:45:59 +02:00
Jonathan Rainville 9dc2b10448 test(StatusSmartIdenticon): add objectName for tests 2022-08-04 09:45:25 +02:00
Alexandra Betouni 9df658a574 feat(StatusQ/Controls): introducing StatusBackButton
Closes: https://github.com/status-im/status-desktop/issues/6727
2022-08-03 20:41:24 +02:00
Boris Melnik 4b4b0950a6 fix(StatusSearchPopup): Fix forceActiveFocus method (#818) 2022-08-03 18:15:50 +03:00
Alexandra Betouni 7b047a4b26 fix(StatusInput): setting default 44px in min/max height (#817) 2022-08-03 16:04:52 +03:00
Igor Sirotin cff836280f Reimplemented components using StatusComboBox (#815)
* fix(StatusAccountSelector): Refactored and reimplemented using `StatusComboBox`
* fix(StatusAssetSelector): Refactored and reimplemented using `StatusComboBox`
* fix(StatusColorSelector): Reimplemented using `StatusComboBox`
* fix(StatusCardPage): Replaced `StatusSelect` with `StatusComboBox`
2022-08-03 15:13:31 +03:00
Mikhail Rogachev e432efac28 fix(StatusCommunityTag): Polish text and icon sizings (#824) 2022-08-03 12:44:35 +03:00
Alexandra Betouni 4dec615cea fix(Utils): moved emojilists.js instance inside Emoji singleton (#816)
Needed for: https://github.com/status-im/status-desktop/issues/6729
2022-08-03 11:51:38 +03:00
Khushboo-dev-cpp f4bf830ae7 feat(StatusDialog): Add DIalog Background componentto make the dialog background customizable (#809) 2022-08-03 09:27:28 +02:00
Khushboo-dev-cpp dbc0c1960a chore: Remove StatusAssetSelector from StatusQ (#806)
* fix(StatusSelect): Expose a property to make arrow in the select item visible/invisible

* chore: Remove StatusAssetSelector from StatusQ as its base component StatusSelect is enough to build this further on desktop side.

This component also has dependecy on BE and hence should be moved out.

BREAKING CHANGE:
2022-08-03 09:22:36 +02:00
Anthony Laibe 03fe75c875 feat(@StatusFloatingButtonsSelector): expose repeater (#795) 2022-08-03 09:08:47 +02:00
Patryk Osmaczko 26eaeb3ad5 chore(StatusListPicker): enable picker to work with incompatible models 2022-08-02 17:03:51 +02:00
Jonathan Rainville 462b905c5c test(StatusListItem): add objectName 2022-08-02 10:03:07 -04:00
Lukáš Tinkl 4e048f724c fix(StatusSeedPhraseInput): Back up seed phrase inputs are missing spacing
Closes: #6720
2022-08-02 13:51:58 +02:00
Lukáš Tinkl e6be4d9bad feat(StatusTextArea): Implement StatusTextArea
Implements a standard QQC2 TextArea control with Status styling

Closes #236
2022-08-02 11:35:11 +02:00
Jonathan Rainville e184348190 feat(StatusInput): add force argument to validate to force validation 2022-08-01 10:06:56 -04:00
Igor Sirotin 2270526071 feat(StatusComboBox): Introduced new component to replace StatusSelect (#790) 2022-07-30 17:45:22 +03:00
Noelia d412fe208e test(StatusTagSelector): Added objectName property needed for automation 2022-07-28 13:51:32 +02:00
Noelia 0040a2d86b test(StatusChatList): Added objectName property needed for automation 2022-07-28 13:51:32 +02:00
Noelia 431aab7bb8 test(StatusChatInfoButton): Added objectName property needed for automation 2022-07-28 13:51:32 +02:00
Alexandra Betouni 938ae6afd8 fix(StatusInput): Replaced layout spacing with margins (#808)
As part of https://github.com/status-im/status-desktop/issues/6022
2022-07-28 11:35:46 +03:00
Khushboo-dev-cpp 63c008571e fix(StatusModal): Adapt the status modal to have a user defined background color (#807)
Add a new color for StatusFloatingButtonSelector
2022-07-27 18:29:44 +02:00
Jonathan Rainville 08c53e2f52 chore(StatusScrollView): remove unused background property
BREAKING CHANGE: removes the background property of the StatusScrollView
2022-07-27 10:26:00 -04:00
Alexandra Betouni 64ec74117d fix(StatusInputPage): updated input height leftovers (#804)
As part of https://github.com/status-im/status-desktop/issues/6637
2022-07-27 16:33:55 +03:00
Patryk Osmaczko e5ab0cd2a7 chore(utils): add iconSource API to Emoji 2022-07-27 13:54:23 +02:00
Patryk Osmaczko 5f1df089eb chore(StatusListPicker): remove imperative updateInputListModel
closes: status-im/status-desktop#6500
2022-07-27 13:54:23 +02:00
Patryk Osmaczko b30f7b3ac5 chore(StatusListPicker): remove imperative filtering
iterates: status-im/status-desktop#6511, status-im/status-desktop#6500
2022-07-27 13:54:23 +02:00
Sale Djenic ac37549f62 fix(StatusSearchPopup): reset search location
New `resetSearchLocationClicked` signal introduced.

Click on `X` button is emitting `resetSearchLocationClicked` signal and
lets a component which is using this one to decide what to do instead just
reseting search selection locally to this component.

Needed for https://github.com/status-im/status-desktop/issues/6551
2022-07-26 14:37:42 +02:00
Khushboo-dev-cpp a60c44e387 Revert "chore: Remove StatusAssetSelector from StatusQ (#792)" (#805)
This reverts commit 3954d49266.
2022-07-26 14:36:26 +02:00
Mikhail Rogachev 694010da38 feat(StatusListView): Add availableWidth/availableHeight to api (#801) 2022-07-26 12:30:31 +03:00
Lukáš Tinkl c0c240ed6a hotfix(@qrc): remove the StatusAssetSelector from qrc files too
fixes the build of StatusQ/sandbox
2022-07-26 10:05:45 +02:00
Lukáš Tinkl 39c1ba4e66 fix(StatusAppNavBar): fix profile icon bottom margin
it should be 24px from the bottom according to the design
2022-07-26 10:05:45 +02:00
Khushboo-dev-cpp 3954d49266 chore: Remove StatusAssetSelector from StatusQ (#792)
* chore: Remove StatusAssetSelector from StatusQ as its base component StatusSelect is enough to build this further on desktop side.

This component also has dependecy on BE and hence should be moved out.

BREAKING CHANGE:

* fix(StatusSelect): Expose a property to make arrow in the select item visible/invisible
2022-07-25 21:16:15 +02:00
Khushboo-dev-cpp 7f99acf32d fix: Move status logo to icons folder needed in the ReceiveModal (#773) 2022-07-25 21:09:50 +02:00
Lukáš Tinkl 59b2fe4641 fix(StatusBanner): TestNet banner overlaps left panel
let the text elide on the right side if the parent width is smaller
than ours

Related: status-im/status-desktop#6600
2022-07-25 12:34:08 +02:00
Alexandra Betouni 2f650dc745 fix(StatusInput): fixing various layout issues (#794)
- Resolved binding loops in StatusInput
- Replaced all instances of StatusBaseinput
  with StatusInput
- Cleaned up min/max height properties
- Fixed total height calculation

Needed for https://github.com/status-im/status-desktop/issues/6358
2022-07-25 13:19:26 +03:00
Michał 795370086b feat(StatusChatListAndCategories) expose highlightItem property (#796) 2022-07-22 16:35:04 +02:00
Igor Sirotin c0057daa7a fix(demoapp): Replaced non-existent web images with locals (#757) 2022-07-22 16:42:05 +03:00
Michał Iskierko 08f8cd60c4 fix(StatusMinLengthValidator): Check if the text contains only whitespaces (#778)
Fixes #6304
2022-07-21 17:27:31 -04:00
Jonathan Rainville bce53e9ccc test(StatusChatToolBar): add object name for tests 2022-07-21 16:29:57 -04:00
Jonathan Rainville 930fa3daf0 test(StatusMenuItemDelegate): add objectName property for tests 2022-07-21 10:39:06 -04:00
Jonathan Rainville bc5c86a2a4 test(StatusChatInfoButton): add objectName to StatusChatInfoButton 2022-07-21 10:38:57 -04:00
Mikhail Rogachev ed6aaab441 feat(StatusListView): Add new ListView, GridView and ScrollView components with tuned scrolling
* fix(StatusScrollView): use Flickable underhood to ScrollView issues

* feat(StatusListView): New listview component without twitches

* fix(StatusScrollView): Fix background positioning and sliders visibility

* feat(StatusGridView): Add GridView wrapper
2022-07-21 16:24:37 +03:00
MishkaRogachev 442ffb9feb Fix building x86_64 solution on Mac M1 2022-07-21 15:00:11 +02:00
Sale Djenic 132cfda244 Necessary updates applied to make it work on mac 2022-07-21 15:00:11 +02:00
Patryk Osmaczko 9b89e08294 feat: add filtering&sorting example
closes: status-im/status-desktop#6510
closes: status-im/status-desktop#6512
2022-07-21 15:00:11 +02:00
Patryk Osmaczko df60ec047a chore: update README and build script 2022-07-21 15:00:11 +02:00
Patryk Osmaczko c9931f95f0 bump vendor/SortFilterProxyModel
iterates: status-im/status-desktop#6510
2022-07-21 15:00:11 +02:00
Patryk Osmaczko 6504543518 chore(git): add vendor/SortFilterProxyModel
iterates: status-im/status-desktop#6510
2022-07-21 15:00:11 +02:00
Patryk Osmaczko 9b7772be3b feat: use cmake instead of qmake
- cmake is superior to qmake (e.g. linking custom libraries)
- maintaining two build system generators is costly

iterates: status-im/status-desktop#6510
2022-07-21 15:00:11 +02:00
Alexandra Betouni 21669aba17 feat(StatusListItem): adding title text icon (#785)
Needed for https://github.com/status-im/status-desktop/issues/6494
2022-07-20 16:53:03 +03:00
Alexandra Betouni 113f700617 fix(StatusQ): Added/updated icon assets (#786)
Nedded for: https://github.com/status-im/status-desktop/issues/6494
2022-07-20 11:03:40 +03:00
Alexandra Betouni fb99107bae fix(StatusActivityCenterButton): updated offset values (#780)
Closes https://github.com/status-im/status-desktop/issues/6350
2022-07-15 19:40:00 +03:00
Alexandra Betouni 9b9b3fcfff fix(demo/CreateChatView): fixed layout issues (#783)
As part of https://github.com/status-im/status-desktop/issues/6452
2022-07-15 19:35:59 +03:00
Alexandra Betouni f19f208b3c fix(StatusBaseButton): centered button's content (#779)
Closes #724
2022-07-15 17:09:58 +03:00
Noelia 4fa885ccea refactor(StatusPickerButton): Component refactor
Component refactor to have a clean and easy-to-read code.
Unnecessary stuff removed.

BREAKING CHANGES: Removed unnecessary properties since the parent already has them.
2022-07-14 17:03:05 +02:00
Lukáš Tinkl e0fd627050 fix(SearchPopup): align with design
Needed for status-im/status-desktop#6428

- set the default icon background color to "transparent"; otherwise it
would be black when unset
- set the popup default size to 560x122 (as designed)
- add placeholder for the search field
- correct the font and icon sizes, spacing and margins according to
design
- fix some warnings
2022-07-14 14:54:26 +02:00
Lukáš Tinkl 06fad29b63 fix(StatusCheckBox): enable setting the font size
add a possibility to override the font size for the contentItem's
StatusBaseText

otherwise it's impossible to do stuff like:
```
StatusCheckBox {
  font.pixelSize: 15
}
```¨
2022-07-14 14:42:20 +02:00
Mikhail Rogachev e7b80a9ae2 feat(StatusScrollView): New scrollview component without twitches (#766) 2022-07-14 15:29:14 +03:00
Khushboo-dev-cpp 24a0e7472d fix(StatusAssetSelector): Fixes the issue of longer text overlapping with the arrow. Have also added a max width for the text after which it should elide (#772) 2022-07-14 11:03:39 +02:00
Pascal Precht 45d8990067 feat(StatusStackModal): introduce prevAction API
This adds a possible `prevAction` hook to `stackLayout.currentItem`
which is triggered (if it exists) when the stack modal's back button is
hit.
2022-07-14 10:12:54 +02:00
Pascal Precht c0d434bbdf fix(StatusBaseInput): ensure correct text color is set for disabled
state
2022-07-14 10:12:54 +02:00
Khushboo-dev-cpp c697467c68 fix: Minors fixes for issues found when using StatusFloatingButtons and implementing new SendModal (#748)
1. Fix the issue of floating buttons having incorrect color in Dark theme
2. Added balances param in StatusAssetSelector. ideally should be removed in another task as it is not the correct place for business logic
2022-07-14 00:05:42 +02:00
Khushboo-dev-cpp e2d42289f7 feat(StatusCard): Create a new reusbale card component (#731)
closes #582
2022-07-14 00:03:44 +02:00
Noelia e781645a58 feat(StatusItemSelector): Component improvements
-  Added `popupItem` property
- Replaced `GridLayout` to `Flow`.
- Added add item logic.
- Added operators logic.
- Added basic documentation.
- Added to sandbox.
2022-07-13 13:17:21 +02:00
Noelia c98f144fd8 feat(StatusIconTextButton): Created new control
It defines a button composed with an icon and plain text.
It has been documented and added to sandbox.
2022-07-13 13:17:21 +02:00
Noelia 016a0eac46 feat(StatusFloatValidator): Updated default bottom and top values 2022-07-13 13:17:21 +02:00
Noelia 29a61c7f5c feat(StatusSwitchTabButton): Added property pixelSize 2022-07-13 13:17:21 +02:00
Noelia a8b9020a4b feat(StatusPickerButton): Added configurable image in front of text 2022-07-13 13:17:21 +02:00
Noelia 8caf994220 chore(icons): Added arrow icon 2022-07-13 13:17:21 +02:00
Noelia 7709810ae2 feat(StatusDropdown): Basic dropdown template 2022-07-13 13:17:21 +02:00
Noelia d8e3557f8f feat(StatusBaseInput): Updated leftMargin depending if it is set from outside 2022-07-13 13:17:21 +02:00
Noelia 59143f7f34 feat(StatusInput): Added alias property to font and binding to left / right paddings 2022-07-13 13:17:21 +02:00
Noelia cb4094b128 feat(StatusItemSelector): First component iteration
- Layout, basic properties and signal.
- Default tag displayed.
- TODO: Selector logic.
2022-07-13 13:17:21 +02:00
Alexandra Betouni 99457ee77f fix(CreateChatView): fixed no contacts text alignment (#767)
As part of https://github.com/status-im/status-desktop/issues/6354
2022-07-13 11:59:53 +03:00
Alexandra Betouni c41318d5e8 fix(StatusAppChatView): Updated layout based on new designs (#765)
As part of https://github.com/status-im/status-desktop/issues/6352
2022-07-13 11:58:59 +03:00
dbcf4565f4 chore(StatusIcon): Include Object Name to Status Icon (#761)
* Include auto generated object names for all Icons.

This will help Squish tests easily identify Icons. Which is used in test case https://github.com/status-im/status-desktop/issues/6274

* Include auto generated object names for all Icons.

This will help Squish tests easily identify Icons. Which is used in test case https://github.com/status-im/status-desktop/issues/6274

* Include auto generated object names for all Icons.

This will help Squish tests easily identify Icons. Which is used in test case https://github.com/status-im/status-desktop/issues/6274

* refactor(isContact): rename isMutualContact to isContact

BREAKING CHANGE: isMutualContact is replaced by isContact anywhere it was used

* fix(StatusStackModal): init the next/finish buttons

call `updateRightButtons()` also on creation to correctly initialize the
Next and Finish buttons in derived classes, when one overrrides these

can be seen in the Backup Seed dialog where the Next button is not
enabled even though all 3 boxes are checked

* feat(StatusFontSettings): Add StatusFontSettings component to change StatusMenuItems font attributes (#749)

Required by #6090

* fix(StatusPinInput): `forceFocus` function exposed

* fix(StatusTagSelector): corrected font size in to label

Needed for https://github.com/status-im/status-desktop/issues/6349

* fix(StatusActivityCenterButton): fixed actvity icon position (#763)

Closes https://github.com/status-im/status-desktop/issues/6350

* Include auto generated object names for all Icons.

This will help Squish tests easily identify Icons. Which is used in test case https://github.com/status-im/status-desktop/issues/6274

* Include auto generated object names for all Icons.

This will help Squish tests easily identify Icons. Which is used in test case https://github.com/status-im/status-desktop/issues/6274

* Include auto generated object names for all Icons.

This will help Squish tests easily identify Icons. Which is used in test case https://github.com/status-im/status-desktop/issues/6274

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
Co-authored-by: Lukáš Tinkl <lukast@status.im>
Co-authored-by: Michał Iskierko <61889657+endulab@users.noreply.github.com>
Co-authored-by: Sale Djenic <aleksandardjenic@status.im>
Co-authored-by: Alexandra Betouni <31625338+alexandraB99@users.noreply.github.com>
2022-07-12 16:58:48 +01:00
Alexandra Betouni 9b1a033571 fix(StatusActivityCenterButton): fixed actvity icon position (#763)
Closes https://github.com/status-im/status-desktop/issues/6350
2022-07-12 18:00:47 +03:00
Alexandra Betouni 25600ec624 fix(StatusTagSelector): corrected font size in to label
Needed for https://github.com/status-im/status-desktop/issues/6349
2022-07-12 16:12:26 +02:00
Sale Djenic 2b4398830a fix(StatusPinInput): forceFocus function exposed 2022-07-12 12:52:30 +02:00
Michał Iskierko 05250a6eab feat(StatusFontSettings): Add StatusFontSettings component to change StatusMenuItems font attributes (#749)
Required by #6090
2022-07-12 11:05:12 +02:00
Lukáš Tinkl 9a2e28f2a7 fix(StatusStackModal): init the next/finish buttons
call `updateRightButtons()` also on creation to correctly initialize the
Next and Finish buttons in derived classes, when one overrrides these

can be seen in the Backup Seed dialog where the Next button is not
enabled even though all 3 boxes are checked
2022-07-12 10:21:14 +02:00
Jonathan Rainville a35d3dca8c refactor(isContact): rename isMutualContact to isContact
BREAKING CHANGE: isMutualContact is replaced by isContact anywhere it was used
2022-07-11 09:29:30 -04:00
Lukáš Tinkl 7363899a96 fix(StatusChatList): StatusChatListItem should follow parent's width
both StatusChatList and StatusChatListItem have the same hardcoded width
of 288, so if we want to make the former smaller, StatusChatListItem has
to obey that, otherwise it's cut on its right side in status-desktop

Status Desktop's new designs have a smaller width (272), this fix is
needed for status-im/status-desktop#6343
2022-07-08 10:11:10 +02:00
Kamil K c921cf7280 fix: handle animations by higher level nodes or states 2022-07-07 09:26:53 +02:00
Lukáš Tinkl e16804c4f0 fix(models): flag/currency icons are rendered blurred
exchange language/currency icons, PNG->SVG
2022-07-06 14:12:06 +02:00
Lukáš Tinkl f7c7f004e2 fix(StatusIcon): flag/currency icons are rendered blurred
- set the Image's sourceSize only if it's an SVG, otherwise it is
rendered blurry
- remove antialiasing/mipmap; it's not the correct fix, doesn't really
improve the visual quality for smallish items like icons and just causes
memory/GPU overhead
2022-07-06 14:12:06 +02:00
Patryk Osmaczko c4421d3552 feat(StatusDialog): introduce StatusDialog
closes: #725
2022-07-06 11:48:11 +02:00
Lukáš Tinkl cdf3059d3d fix(sandbox): enable the hover effects by default (#751)
Similar to what we did in status desktop under
d0a26a326e95a14a6a8a5634c0d30cd6dc648b54

- since Qt 5.xy, hover is not enabled by default for QQC2, so enable it
unconditionally as we are a desktop app anyway
- this fixes several hover effects being broken, mostly for builtin
components like MenuItem and some buttons (eg. the leftmost NavBar)
where we haven't enabled those with `hoverEnabled: true` explicitely
2022-07-04 17:09:00 +02:00
Lukáš Tinkl 5e590056ff fix(@sandbox): greatly speed up (re)build times (#746)
since most of the compilation time is spent on creating the QRC bundle
and the resulting binary is quite huge, advice the `rcc` compiler to add
support for "big resources"
(cf https://doc.qt.io/qt-6/resources.html#embedding-large-files)

Also pass the env $LDFLAGS to qmake (to be able to link e.g. with mold,
which again greatly reduces the time to link the binary)

this leads to 6-10x faster time when recompiling
(Linux, gcc 12.1.1, mold 1.3.0)

BEFORE:
Clean build:
real	0m57,256s
user	1m25,869s
sys	0m40,963s

Incremental build, one file touched:
real	0m54,323s
user	0m54,012s
sys	0m2,934s

AFTER:
Clean build:
real	0m7,276s
user	0m21,001s
sys	0m37,256s

Incremental build, one file touched:
real	0m5,569s
user	0m4,850s
sys	0m0,840s
2022-07-01 10:18:09 +02:00
Mikhail Rogachev 7b8cf2ffb5 feat(StatusStackModal): add subheader and remove explicit width (#747) 2022-06-30 20:35:20 +03:00
Igor Sirotin 6da838c81f fix(icons): Updated arrows icons (#735) 2022-06-30 09:24:04 +04:00
Mikhail Rogachev a2e9f813a5 Fix(StatusStackModal): fix height calculation (#745) 2022-06-29 14:04:17 -04:00
Iuri Matias 64d6beb4a0 bug(@status-q): only run animations when they are visible to avoid cpu issues (#744)
bug(@status-q): only run animations when they are visible to avoid cpu issues

remove prop that doesn't exist
2022-06-28 11:03:17 -04:00
Mikhail Rogachev 84c529d58d feat(StatusStackModal): Component to replace nested StausModals (#733) 2022-06-27 12:23:36 -04:00
Noelia fe355eebf8 fix(StatusChatToolBar): Updated activity center button size
Activity center button has now the same size than the other toolbar buttons.

Fixes https://github.com/status-im/status-desktop/issues/6216
2022-06-27 07:52:14 +02:00
Noelia b064f9ebd8 feat(StatusRoundButton): Added Tertiary type
- Transparent background but when hovered, like Primary type in idle state.

- Updated sandbox with the new type.
2022-06-27 07:50:22 +02:00
Sale Djenic 604bb7a74c fix(StatusToastMessage): clicked signal added 2022-06-23 19:52:23 +02:00
Jonathan Rainville 7d064d6c6e chore(StatusFlatRoundButon): fix warning related to hovered property 2022-06-23 11:44:06 -04:00
Noelia 1730fe756d fix(StatusCommunityCard): Added implicit width and height (#739)
Fixes https://github.com/status-im/status-desktop/issues/6206
2022-06-22 16:48:10 -04:00
Igor Sirotin 996717885d feat(icons): Added unpin icon (#738) 2022-06-22 16:47:51 +03:00
Igor Sirotin 34c223b581 feat(StatusListItem): Added loading and loadingFailed properties (#736) 2022-06-22 10:40:17 +03:00
Mikhail Rogachev 7b35be6691 fix(StatusCommunityTag): fix StatusCommunityTag and and ETH icon (#734) 2022-06-20 18:09:38 +03:00
Igor Sirotin 2186259c06 fix(contributing.md): Added Popup sizing guidelines (#728) 2022-06-17 14:37:52 +03:00
Mikhail Rogachev 69b5cb1988 feat(StatusCommunityTags): Add community tags component (#718) 2022-06-14 16:23:18 +03:00
Boris Melnik cb900fe494 feat(StatusQ.Controls): Introduce StatusActivityCenterButton (#705) 2022-06-14 13:01:08 +03:00
Igor Sirotin 1d618f72f7 fix(StatusBaseButton): Passed icon.rotation property to the icon component (#727) 2022-06-14 12:21:53 +03:00
Khushboo-dev-cpp d5df8b42a7 feat(StatusFloatingButtonsSelector): Implements the floating buttons selector widget (#681)
To be used in with StatusModal or independently
2022-06-14 11:07:08 +05:30
Igor Sirotin c0639d8b8e fix(StatusTabButton): Hide bottom dash in disabled state (#729) 2022-06-13 17:53:30 +03:00
Patryk Osmaczko b816643e2d fix: adapt StatusMemeberListItem usages to renamed properties 2022-06-13 10:45:35 +02:00
Noelia 33a3ee3d6e feat(StatusCommunityCard): Added explicit dependency between z properties
Added explicit dependency between z properties with banner, logo, and content card.
2022-06-13 09:48:25 +02:00
Noelia 2f24b69462 fix(StatusListItemTag): Added margins to better center the content
Added margins to better center the content
2022-06-13 09:48:25 +02:00
Noelia 40db66f763 feat(StatusCommunityCard): New design
- Added community banner.
- Added community restrictions / private.
- Modified card background shape.
- Modified logo shape and position.
- Modified text position and size.
- Modified `loading state` card.
- Added `DropShadow` effect.
- Added new icons.
- Added new community images and updated model.
- Added numbers format function.
- Added following new properties: `banner`,`activeUsers` `communityColor`, `isPrivate` and `tokenLogo`.

Closes #692
2022-06-13 09:48:25 +02:00
Patryk Osmaczko 5361b56e9f chore: adapt to new user/member backend models structure 2022-06-12 15:37:29 +02:00
Patryk Osmaczko 0e73530b05 chore(StatusModal): set StatusModal margins to 64
closes: status-im/status-desktop#6049
2022-06-12 12:43:03 +02:00
Patryk Osmaczko 0f5c1ce4c6 chore(StatusModal): make StatusModal follow padding
https://github.com/status-im/status-desktop/pull/6010#discussion_r892148627
2022-06-12 12:43:03 +02:00
Noelia b569782d4c feat(StatusTagSelector): Updated component to use StatusTagItem as a delegate
Updated component to use `StatusTagItem` as a delegate.
2022-06-09 15:49:07 +02:00
Noelia d69b0598bf feat(StatusTagItem): Created new control that represents a tag item
Created new `StatusTagItem` control and added that represents a tag item with a `text`, `icon` and `isReadonly` properties.
2022-06-09 15:49:07 +02:00
Noelia 70834fc187 feat(StatusTagSelector): Introduced readonly tags and possibility of icon
- Different tag color depending if the entry `isReadonly` or not.
- Tag disabled if the entry `isReadonly`.
- Possibility to show icon if entry contains the proper info.
- Added property `orderByReadonly` to position `isReadonly` entries in the left.

Updated sandbox project examples according to new tag updates.

Closes #694
2022-06-09 15:49:07 +02:00
Anthony Laibe 18d385cf2b feat(@StatusAssetSelector): Use asset selector per symbol and not (#715)
address
2022-06-09 15:10:45 +02:00
Alexandra Betouni 648406c442 fix(StatusTagSelector): Fixed Layout issues when shrinking (#714)
Closes https://github.com/status-im/status-desktop/issues/5954
2022-06-09 14:41:05 +03:00
Alexandra Betouni 5f7bd307ef fix(StatusSeedPhraseInput): removed input anchoring not needed after refactor
Closes https://github.com/status-im/status-desktop/issues/5967
2022-06-07 16:25:09 +02:00
Igor Sirotin 890ef86e1c fix(StatusBaseButton): Mouse events ignored when button is disabled (#707)
* fix(StatusBaseButton): Mouse events ignored when button is disabled
2022-06-07 14:56:45 +03:00
Noelia 0b855bfb48 fix(StatusPopupMenu): Changed dim to false
Changed dim to false.

Fixes https://github.com/status-im/status-desktop/issues/5828
2022-06-07 11:19:52 +02:00
Patryk Osmaczko 10cd9b23c1 fix(StatusSearchPopup): add color hash to chat icons 2022-06-02 10:01:52 +02:00
Patryk Osmaczko bf3578cf7c chore(StatusBaseText): add theme aware default color 2022-06-01 16:26:10 +02:00
Boris Melnik da22cde5e6 feat(StatusMemberListItem): Add admin status (#704) 2022-06-01 15:00:15 +03:00
Alexandra Betouni 312858b420 feat(StatusTagSelector): Added colorIdForPubkeyGet property (#702)
Needed for: https://github.com/status-im/status-desktop/issues/5875
2022-06-01 10:47:38 +03:00
Noelia a4d0c13662 feat(StatusTagSelector): Added property showSortedListOnlyWhenText and make dynamic the implicitHeight
Added property `showSortedListOnlyWhenText` and make dynamic the `implicitHeight` calculation.
2022-05-31 15:22:17 +02:00
Noelia 61007c32e9 chore(assets): Added new icon add-to-dm
Added new icon `add-to-dm`.
2022-05-31 15:22:17 +02:00
Noelia 1cadfc051b feat(StatusChatToolBar): Add flexible component in right toolbar position
- Added loader in right component position and removed `StatusChatInfoButton` specific.

- Updated sandbox and added new example in Layouts with another different component than the `StatusChatInfoButton`.

BREAKING CHANGES:
The toolbar now expects a component to be loaded. The previous `StatusChatInfoButton` component has been removed and needs to be passed as a component from outside whenever needed.
Breaking changes in `desktop` will be addressed in: https://github.com/status-im/status-desktop/pull/5823
2022-05-31 15:22:17 +02:00
Noelia 46cd904ced feat(StatusCommunityCard): First component iteration (#693)
It includes logo, title, community members, description, loaded, community id, popularity, tags row (that must be replaced to a new StatusQ component `StatusListItemTagRow`.

It also contains `locale` property used to decide the member's number format.

Added loading card.

Added Community Card page (components test) and view (demo app) in sandbox.

Added component documentation.

Part of task: https://github.com/status-im/status-desktop/issues/4936
2022-05-31 11:44:26 +02:00
Patryk Osmaczko 9120a0fa1c chore(StatusBaseInput): expose placeholder as alias 2022-05-31 10:03:49 +02:00
Patryk Osmaczko 406e4a1177 chore(StatusInput): use layouts for elements positioning
It removes complexity and fixes StatusInput to follow the size assigned
by client.
2022-05-31 10:03:49 +02:00
Sale Djenic be0f49a8d8 fix(StatusRoundedImage): actual loaded image width and height updated
In case you're dynamically change source image and image width and height
are way bigger than the rounded image component width and height, resizing
was not done correctly.

update

update
2022-05-31 09:11:29 +02:00
Alexandra Betouni 24228c5568 feat(icons): adding view icon
Needed for: https://github.com/status-im/status-desktop/issues/4918
2022-05-30 16:17:25 +02:00
Alexandra Betouni 6056db73cf feat(StatusBaseInput): disabled mouse area when input is disabled
Needed for: https://github.com/status-im/status-desktop/issues/4918
2022-05-30 16:16:51 +02:00
Stefan ee3effcdd1 fix(StatusImageCrop): fix wrong initial image fit
The initial fit was computed for the square crop-window

updates: 5118
2022-05-26 03:00:24 +03:00
Mikhail Rogachev 07e711e30c feat(StatusLabeledSlider): add ability to decorate sliders and slider, decorated with lablels (#687)
Close #686
2022-05-25 11:12:50 +03:00
r4bbit.eth 0b1a910b06 fix(StatusNavigationListItem): make click handler work again (#688)
The click handler used inside the component broke in one of the latest
changes done in `StatusListItem` where it expects two arguments being
passed to its click handler.

This commit fixes it by supplying all needed arguments (where `itemId`
is always `''` unless set differently)
2022-05-24 15:57:59 -04:00
Mikhail Rogachev 81cbab3f66 feat(StatusColorSpace): impl color space component (#679) 2022-05-24 10:32:40 +03:00
Alexandra Betouni d31dddac7e fix(StatusListItem): added mouse obj parameter in clicked signal (#683)
Needed for: https://github.com/status-im/status-desktop/issues/5212
2022-05-23 18:22:01 +03:00
233 changed files with 19152 additions and 12875 deletions
+3
View File
@@ -0,0 +1,3 @@
[submodule "vendor/SortFilterProxyModel"]
path = vendor/SortFilterProxyModel
url = https://github.com/status-im/SortFilterProxyModel.git
+18
View File
@@ -2,4 +2,22 @@ cmake_minimum_required(VERSION 3.19)
project(StatusQ)
if (APPLE)
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=10.14)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# https://doc.qt.io/qtcreator/creator-qml-modules-with-plugins.html#importing-qml-modules
set(QML_IMPORT_PATH
${CMAKE_SOURCE_DIR}/src;${QML_IMPORT_PATH}
CACHE STRING "")
add_subdirectory(vendor/SortFilterProxyModel)
add_subdirectory(sandbox)
add_subdirectory(tests)
+5 -6
View File
@@ -36,7 +36,7 @@ To make viewing and testing components easy, we've added a sandbox application t
### Using Qt Creator
The easiest way to run the sandbox application is to simply open the provided `sandbox.pro` file using Qt Creator.
The easiest way to run the sandbox application is to simply open the provided `CMakeLists.txt` file using Qt Creator.
### Using command line interface
@@ -44,14 +44,13 @@ To run the sandbox from within a command line interface, run the following comma
```
$ git clone https://github.com/status-im/StatusQ
$ cd StatusQ/sandbox
$ ./scripts/build
$ cd StatusQ
$ git submodule update --init
$ ./sandbox/scripts/build
```
Once that is done, the sandbox can be started with the generated executable:
```
$ ./bin/sandbox
$ ./build/sandbox/Sandbox
```
More Documentation available on the [wiki](https://hackmd.io/@status-desktop/B1naRjxh_/%2FwFtiXvOiQqCdw2lk6gbOLA)
Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+1
View File
@@ -20,6 +20,7 @@
\li \l{StatusChatToolBar}
\li \l{StatusContactRequestsIndicatorListItem}
\li \l{StatusDescriptionListItem}
\li \l{StatusItemSelector}
\li \l{StatusLetterIdenticon}
\li \l{StatusListItem}
\li \l{StatusListPicker}
+2
View File
@@ -15,6 +15,7 @@
\li \l{StatusChatInfoButton}
\li \l{StatusChatListCategoryItemButton}
\li \l{StatusColorSelector}
\li \l{StatusDropdown}
\li \l{StatusIconTabButton}
\li \l{StatusNavBarTabButton}
\li \l{StatusTabBarIconButton}
@@ -30,6 +31,7 @@
\li \l{StatusSlider}
\li \l{StatusSelect}
\li \l{StatusBaseInput}
\li \l{StatusIconTextButton}
\li \l{StatusIdenticonRing}
\li \l{StatusInput}
\li \l{StatusItemPicker}
+1
View File
@@ -12,6 +12,7 @@
\list
\li \l{StatusAppNavBarFilterModel}
\li \l{StatusBaseText}
\li \l{StatusFontSettings}
\li \l{StatusIcon}
\li \l{StatusIconBackgroundSettings}
\li \l{StatusIconSettings}
+38
View File
@@ -0,0 +1,38 @@
project(Sandbox)
find_package(
Qt5
COMPONENTS Core Quick QuickControls2
REQUIRED)
file(GLOB_RECURSE QML_FILES "../*.qml")
file(GLOB_RECURSE JS_FILES "../*.js")
file(GLOB_RECURSE HEADERS *.h)
if(APPLE)
file(GLOB_RECURSE SOURCES *.cpp *.mm)
else()
file(GLOB_RECURSE SOURCES *.cpp)
endif()
qt5_add_big_resources(QRC_FILES qml.qrc ../src/statusq.qrc ../src/assets.qrc)
add_executable(
${PROJECT_NAME}
${HEADERS}
${SOURCES}
${QRC_FILES}
${QML_FILES}
${JS_FILES})
target_compile_definitions(${PROJECT_NAME}
PRIVATE SRC_DIR="${CMAKE_CURRENT_LIST_DIR}")
target_link_libraries(
${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick Qt5::QuickControls2
SortFilterProxyModel)
if (APPLE)
find_library(AppKit AppKit)
find_library(Foundation Foundation)
target_link_libraries(${PROJECT_NAME} PRIVATE ${AppKit} ${Foundation})
endif()
+15 -6
View File
@@ -25,10 +25,11 @@ Rectangle {
id: appSectionType
readonly property int chat: 0
readonly property int community: 1
readonly property int wallet: 2
readonly property int communitiesPortal: 2
readonly property int wallet: 3
readonly property int browser: 3
readonly property int nodeManagement: 4
readonly property int profileSettings: 5
readonly property int nodeManagement: 5
readonly property int profileSettings: 6
readonly property int apiDocumentation: 100
readonly property int demoApp: 101
}
@@ -118,6 +119,11 @@ Rectangle {
appView.sourceComponent = statusAppChatView
demoApp.setActiveItem(model.sectionId)
}
else if(model.sectionType === appSectionType.communitiesPortal)
{
appView.sourceComponent = statusCommunityPortalView
demoApp.setActiveItem(model.sectionId)
}
else if(model.sectionType === appSectionType.profileSettings)
{
appView.sourceComponent = statusAppProfileSettingsView
@@ -168,9 +174,7 @@ Rectangle {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}
@@ -205,6 +209,11 @@ Rectangle {
StatusAppProfileSettingsView { }
}
Component {
id: statusCommunityPortalView
StatusAppCommunitiesPortalView { }
}
DemoContactRequestsModal {
id: demoContactRequestsModal
anchors.centerIn: parent
+75 -7
View File
@@ -3,9 +3,10 @@ import QtQuick.Layouts 1.14
import QtQuick.Dialogs 1.3
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
Column {
spacing: 10
Grid {
@@ -16,6 +17,24 @@ Column {
horizontalItemAlignment: Grid.AlignHCenter
// Primary
StatusButton {
text: "Button"
type: StatusBaseButton.Type.Primary
}
StatusButton {
text: "Button"
enabled: false
type: StatusBaseButton.Type.Primary
}
StatusButton {
text: "Button"
loading: true
type: StatusBaseButton.Type.Primary
}
// Large
StatusButton {
text: "Button"
@@ -173,6 +192,25 @@ Column {
loading: true
}
// transparent
StatusRoundButton {
type: StatusRoundButton.Type.Tertiary
icon.name: "info"
}
StatusRoundButton {
type: StatusRoundButton.Type.Tertiary
icon.name: "info"
enabled: false
}
StatusRoundButton {
type: StatusRoundButton.Type.Tertiary
icon.name: "info"
loading: true
}
// Rounded blue
StatusFlatRoundButton {
@@ -307,12 +345,42 @@ Column {
onClicked: {
colorDialog.open();
}
ColorDialog {
id: colorDialog
property bool colorSelected: false
onAccepted: {
colorSelected = true;
}
}
StatusColorDialog {
id: colorDialog
anchors.centerIn: parent
property bool colorSelected: false
onAccepted: {
colorSelected = true;
}
}
// Button with emoji
StatusButton {
text: "Button with Emoji"
icon.emoji: "🖼️"
}
RowLayout {
spacing: 20
StatusIconTextButton {
Layout.alignment: Qt.AlignVCenter
spacing: 0
statusIcon: "next"
icon.width: 24
icon.height: 24
iconRotation: 180
text: "Previous page"
font.pixelSize: 15
onClicked: testText.visible = !testText.visible
}
StatusBaseText {
id: testText
Layout.alignment: Qt.AlignVCenter
text: "Click and hide!"
font.pixelSize: 15
}
}
}
+17 -7
View File
@@ -32,14 +32,14 @@ GridLayout {
}
StatusIconTabButton {
icon.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
icon.source: "qrc:/demoapp/data/profile-image-1.jpeg"
}
StatusIconTabButton {
icon.color: Theme.palette.miscColor9
// This icon source is flawed and demonstrates the fallback case
// when the image source can't be loaded
icon.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jp"
icon.source: "https://httpstat.us/404"
name: "Pascal"
}
@@ -86,7 +86,7 @@ GridLayout {
}
StatusNavBarTabButton {
icon.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
icon.source: "qrc:/demoapp/data/profile-image-1.jpeg"
tooltip.text: "Some Community"
}
@@ -124,7 +124,7 @@ GridLayout {
title: "Iuri Matias"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
type: StatusChatInfoButton.Type.OneToOneChat
muted: true
pinnedMessagesCount: 1
@@ -137,7 +137,7 @@ GridLayout {
title: "Iuri Matias elided"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
type: StatusChatInfoButton.Type.OneToOneChat
muted: true
pinnedMessagesCount: 1
@@ -152,7 +152,7 @@ GridLayout {
title: "Iuri Matias big not elided"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
type: StatusChatInfoButton.Type.OneToOneChat
muted: true
pinnedMessagesCount: 1
@@ -189,6 +189,16 @@ GridLayout {
value: 40
}
StatusLabeledSlider {
width: 360
model: [ qsTr("XS"), qsTr("S"), qsTr("M"), qsTr("L"), qsTr("XL"), qsTr("XXL")]
}
StatusLabeledSlider {
width: 360
model: [ qsTr("50%"), qsTr("100%"), qsTr("150%"), qsTr("200%")]
}
StatusBanner {
id: banner
width: 360
@@ -198,7 +208,7 @@ GridLayout {
}
StatusProgressBar {
id: progressBar
id: progressBar
text: "Weak"
value: 0.5
fillColor : Theme.palette.pinColor1
+85 -28
View File
@@ -10,31 +10,96 @@ import StatusQ.Layout 0.1
import StatusQ.Popups 0.1
Column {
spacing: 5
spacing: 10
StatusChatToolBar {
chatInfoButton.title: "Some contact"
chatInfoButton.subTitle: "Contact"
chatInfoButton.icon.color: Theme.palette.miscColor7
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
toolbarComponent: chatInfoButton1
width: 518
Component {
id: chatInfoButton1
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Some contact"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.OneToOneChat
}
}
}
StatusChatToolBar {
chatInfoButton.title: "Some contact"
chatInfoButton.subTitle: "Contact"
chatInfoButton.icon.color: Theme.palette.miscColor7
chatInfoButton.type: StatusChatInfoButton.Type.PublicChat
chatInfoButton.pinnedMessagesCount: 1
chatInfoButton.muted: true
toolbarComponent: chatInfoButton2
width: 518
Component {
id: chatInfoButton2
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Some contact"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.PublicChat
pinnedMessagesCount: 1
muted: true
}
}
}
StatusChatToolBar {
chatInfoButton.title: "Some contact"
chatInfoButton.subTitle: "Contact"
chatInfoButton.icon.color: Theme.palette.miscColor7
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
chatInfoButton.pinnedMessagesCount: 1
notificationCount: 1
toolbarComponent: chatInfoButton3
width: 518
Component {
id: chatInfoButton3
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Some contact"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.OneToOneChat
pinnedMessagesCount: 1
}
}
}
StatusChatToolBar {
notificationCount: 1
toolbarComponent: tagSelector
width: 518
Component {
id: tagSelector
StatusTagSelector {
namesModel: ListModel {
ListElement {
publicId: "0x0"
name: "Maria"
icon: ""
isIdenticon: false
onlineStatus: 3
isReadonly: true
tagIcon: "crown"
}
ListElement {
publicId: "0x1"
name: "James"
icon: ""
isIdenticon: false
onlineStatus: 1
isReadonly: false
tagIcon: ""
}
}
toLabelText: qsTr("To: ")
warningText: qsTr("USER LIMIT REACHED")
}
}
}
Row {
@@ -158,9 +223,7 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}
@@ -243,9 +306,7 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}
@@ -333,9 +394,7 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}
@@ -428,9 +487,7 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}
+48 -15
View File
@@ -73,13 +73,13 @@ GridLayout {
StatusChatListItem {
name: "community-channel-with-image"
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
type: StatusChatListItem.Type.CommunityChat
}
StatusChatListItem {
name: "Weird Crazy Otter"
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
type: StatusChatListItem.Type.OneToOneChat
}
@@ -179,7 +179,7 @@ GridLayout {
StatusListItem {
title: "Title"
subTitle: "Subtitle"
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
}
StatusListItem {
@@ -314,7 +314,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
image.source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0Bh
CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
image.isIdenticon: true
badge.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
badge.image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
badge.primaryText: "CryptoKitties"
badge.secondaryText: "#test"
}
@@ -394,13 +394,13 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
StatusMemberListItem {
nickName: "This is an example"
userName: "annabelle"
chatKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
isMutualContact: true
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isVerified: true
isContact: true
image.source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
image.isIdenticon: true
isOnline: true
status: 1 // FIXME: use enum
ringSettings.ringSpecModel:
ListModel {
ListElement {colorId: 13; segmentLength: 5}
@@ -416,29 +416,62 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
StatusMemberListItem {
nickName: "carmen.eth"
isOnline: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
isUntrustworthy: true
}
StatusMemberListItem {
nickName: "very-long-annoying-nickname.eth"
isOnline: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
isUntrustworthy: true
}
StatusMemberListItem {
nickName: "This girl I know from work"
userName: "annabelle"
isOnline: true
status: 1 // FIXME: use enum
}
StatusMemberListItem {
nickName: "Mark Cuban"
userName: "annabelle"
chatKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isMutualContact: true
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isContact: true
image.source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
image.isIdenticon: true
}
StatusMemberListItem {
nickName: "admin.guy"
isAdmin: true
isUntrustworthy: true
}
StatusBaseText {
Layout.fillWidth: true
Layout.topMargin: 16
text: "Loading features:"
font.pixelSize: 17
}
StatusListItem {
title: "Nokia 3310"
subTitle: "Incoming device"
label: "loading: true"
icon.emoji: "😁"
icon.color: "hotpink"
icon.letterSize: 14
icon.isLetterIdenticon: true
loading: true
}
StatusListItem {
title: "Nokia 3310"
subTitle: "Device"
label: "loadingFailed: true"
icon.emoji: "😁"
icon.color: "hotpink"
icon.letterSize: 14
icon.isLetterIdenticon: true
loadingFailed: true
}
}
+5 -2
View File
@@ -22,7 +22,7 @@ ColumnLayout {
}
StatusRoundedImage {
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
}
StatusBadge {}
@@ -57,5 +57,8 @@ ColumnLayout {
}
}
}
}
StatusDatePicker {
label: "Select date"
}
}
+64 -17
View File
@@ -4,6 +4,8 @@ import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Utils 0.1
Column {
spacing: 20
@@ -83,6 +85,12 @@ Column {
onClicked: advancedHeaderFooterModal.open()
}
StatusButton {
text: "Modal with Floating header Buttons"
onClicked: floatingHeaderModal.open()
}
StatusModal {
id: simpleModal
anchors.centerIn: parent
@@ -101,7 +109,7 @@ Column {
anchors.centerIn: parent
header.title: "Some Title"
header.subTitle: "Subtitle"
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
header.image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
}
StatusModal {
@@ -109,12 +117,9 @@ Column {
anchors.centerIn: parent
header.title: "Some Title"
header.subTitle: "Subtitle"
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
header.image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
leftButtons: [
StatusRoundButton {
icon.name: "arrow-right"
rotation: 180
}
StatusBackButton { }
]
rightButtons: [
StatusButton {
@@ -131,7 +136,7 @@ Column {
anchors.centerIn: parent
header.title: "Some Title"
header.subTitle: "Subtitle"
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
header.image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
headerActionButton: StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary
@@ -144,10 +149,7 @@ Column {
}
leftButtons: [
StatusRoundButton {
icon.name: "arrow-right"
rotation: 180
}
StatusBackButton { }
]
rightButtons: [
StatusButton {
@@ -162,7 +164,7 @@ Column {
StatusModal {
id: modalExample
anchors.centerIn: parent
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
header.image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
header.title: "Header"
header.subTitle: "SubTitle"
rightButtons: [
@@ -175,10 +177,7 @@ Column {
]
leftButtons: [
StatusRoundButton {
icon.name: "arrow-right"
rotation: 180
}
StatusBackButton { }
]
contentItem: StatusBaseText {
@@ -394,10 +393,58 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
}
}
StatusModal {
id: floatingHeaderModal
anchors.centerIn: parent
height: 200
showHeader: false
showFooter: false
showAdvancedHeader: true
hasFloatingButtons: true
advancedHeaderComponent: StatusFloatingButtonsSelector {
id: floatingHeader
model: dummyAccountsModel
delegate: Rectangle {
width: button.width
height: button.height
radius: 8
visible: visibleIndices.includes(index)
color: Theme.palette.statusAppLayout.backgroundColor
StatusButton {
id: button
topPadding: 8
bottomPadding: 0
implicitHeight: 32
defaultLeftPadding: 4
text: name
icon.emoji: !!emoji ? emoji: ""
icon.emojiSize: Emoji.size.middle
icon.name: !emoji ? "filled-account": ""
normalColor: "transparent"
highlighted: index === floatingHeader.currentIndex
onClicked: {
floatingHeader.currentIndex = index
}
}
}
popupMenuDelegate: StatusListItem {
implicitWidth: 272
title: name
onClicked: floatingHeader.itemSelected(index)
visible: !visibleIndices.includes(index)
}
}
}
ListModel {
id: dummyAccountsModel
ListElement{name: "Account 1"; iconName: "filled-account"}
ListElement{name: "Account 1"; iconName: "filled-account"; emoji: "🥑"}
ListElement{name: "Account 2"; iconName: "filled-account"}
ListElement{name: "Account 3"; iconName: "filled-account"}
ListElement{name: "Account 4"; iconName: "filled-account"}
ListElement{name: "Account 5"; iconName: "filled-account"}
ListElement{name: "Account 6"; iconName: "filled-account"}
ListElement{name: "Account 7"; iconName: "filled-account"}
}
StatusSpellcheckingMenuItems {
+1 -1
View File
@@ -41,7 +41,7 @@ ListView {
}
messageText: model.message
hasMention: model.hasMention
isMutualContact: model.isMutualContact
isContact: model.isContact
trustIndicator: model.trustIndicator
isPinned: model.isPinned
pinnedBy: model.pinnedBy
+30 -8
View File
@@ -20,6 +20,7 @@ Page {
height: tagSelector.height
anchors.right: parent.right
anchors.rightMargin: 8
spacing: 16
StatusTagSelector {
id: tagSelector
@@ -36,7 +37,7 @@ Page {
var index = -1;
if (!!contactsModel) {
for (var i = 0; i < contactsModel.count; i++) {
if (contactsModel.get(i).publicId === pubKey) {
if (contactsModel.get(i).pubKey === pubKey) {
index = i;
}
}
@@ -58,6 +59,11 @@ Page {
}
return randomString.join().toString().replace(/,/g, '');
}
colorIdForPubkeyGetter: function (pubKey) {
//for simulation purposes only, in real app
//this would be Utils.colorIdForPubkey(pubKey);
return Math.floor(Math.random() * 10);
}
onTextChanged: {
sortModel(root.contactsModel);
}
@@ -68,27 +74,43 @@ Page {
}
StatusButton {
implicitWidth: 106
implicitHeight: 44
Layout.alignment: Qt.AlignTop
enabled: (tagSelector.namesModel.count > 0)
text: "Confirm"
}
Item {
implicitHeight: 32
implicitWidth: 32
Layout.alignment: Qt.AlignTop
StatusActivityCenterButton {
id: notificationButton
anchors.right: parent.right
unreadNotificationsCount: 3
}
}
}
contentItem: Item {
anchors.fill: parent
anchors.topMargin: 68
StatusBaseText {
visible: (contactsModel.count === 0)
anchors.centerIn: parent
anchors.left: parent.left
anchors.leftMargin: 252
anchors.right: parent.right
anchors.rightMargin: 252
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -(headerRow.height/2)
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pixelSize: 15
visible: contactsModel.count === 0
wrapMode: Text.WordWrap
color: Theme.palette.baseColor1
text: qsTr("You can only send direct messages to your Contacts. \n\n
Send a contact request to the person you would like to chat with, you will be\n able to
chat with them once they have accepted your contact request.")
text: qsTr("You can only send direct messages to your Contacts.\n
Send a contact request to the person you would like to chat with, you will be able to chat with them once they have accepted your contact request.")
Component.onCompleted: {
if (visible) {
tagSelector.enabled = false;
+2 -3
View File
@@ -13,7 +13,7 @@ StatusModal {
header.title: "Cryptokitties"
header.subTitle: "Public Community"
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
header.image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
contentItem: Column {
width: root.width
@@ -103,8 +103,7 @@ StatusModal {
anchors.horizontalCenter: parent.horizontalCenter
statusListItemTitle.font.pixelSize: 17
title: "Leave community"
icon.name: "arrow-right"
icon.rotation: 180
icon.name: "arrow-left"
type: StatusListItem.Type.Secondary
}
}
+65 -35
View File
@@ -16,53 +16,78 @@ StatusAppThreePanelLayout {
leftPanel: Item {
anchors.fill: parent
StatusNavigationPanelHeadline {
id: headline
anchors.top: parent.top
anchors.topMargin: 16
anchors.horizontalCenter: parent.horizontalCenter
text: "Chat"
}
anchors.margins: 16
RowLayout {
id: searchInputWrapper
width: 288
height: searchInput.height
anchors.top: headline.bottom
anchors.topMargin: 16
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
StatusBaseInput {
id: searchInput
Layout.fillWidth: true
StatusNavigationPanelHeadline {
id: headline
Layout.alignment: Qt.AlignVCenter
implicitHeight: 36
topPadding: 8
bottomPadding: 8
placeholderText: "Search"
icon.name: "search"
text: "Chat"
}
StatusIconTabButton {
Item {
Layout.fillWidth: true
}
StatusRoundButton {
Layout.alignment: Qt.AlignVCenter
icon.name: "public-chat"
icon.color: Theme.palette.directColor1
icon.height: editBtn.icon.height
icon.width: editBtn.icon.width
implicitWidth: editBtn.implicitWidth
implicitHeight: editBtn.implicitHeight
type: StatusRoundButton.Type.Tertiary
StatusToolTip {
text: qsTr("Join public chats")
visible: parent.hovered
orientation: StatusToolTip.Orientation.Bottom
y: parent.height + 12
}
}
StatusIconTabButton {
id: editBtn
icon.name: "edit"
icon.color: Theme.palette.directColor1
checked: root.createChat
highlighted: checked
onClicked: {
root.createChat = !root.createChat;
}
StatusToolTip {
text: qsTr("Start chat")
visible: parent.hovered
orientation: StatusToolTip.Orientation.Bottom
y: parent.height + 12
}
}
}
Column {
StatusInput {
id: searchInput
anchors.top: searchInputWrapper.bottom
anchors.topMargin: 16
width: parent.width
maximumHeight: 36
topPadding: 8
bottomPadding: 8
placeholderText: "Search"
input.icon.name: "search"
}
Column {
width: parent.width
anchors.top: searchInput.bottom
anchors.topMargin: 16
anchors.horizontalCenter: parent.horizontalCenter
spacing: 8
StatusContactRequestsIndicatorListItem {
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
title: "Contact requests"
requestsCount: 3
@@ -70,6 +95,7 @@ StatusAppThreePanelLayout {
}
StatusChatList {
width: parent.width
model: Models.demoChatListItems
highlightItem: !root.createChat
onChatItemUnmuted: {
@@ -145,15 +171,8 @@ StatusAppThreePanelLayout {
anchors.fill: parent
StatusChatToolBar {
anchors.top: parent.top
width: parent.width
chatInfoButton.title: "Amazing Funny Squirrel"
chatInfoButton.subTitle: "Contact"
chatInfoButton.icon.color: Theme.palette.miscColor7
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
chatInfoButton.pinnedMessagesCount: 1
toolbarComponent: statusChatInfoButton
searchButton.visible: false
membersButton.visible: false
notificationCount: 1
@@ -180,12 +199,23 @@ StatusAppThreePanelLayout {
StatusMenuItem {
text: "Leave Chat"
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}
Component {
id: statusChatInfoButton
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Amazing Funny Squirrel"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.OneToOneChat
pinnedMessagesCount: 1
}
}
}
}
}
@@ -0,0 +1,156 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import "../demoapp/data" 1.0
StatusScrollView {
id: root
QtObject {
id: d
property ListModel featuredCommunitiesModel: Models.featuredCommunitiesModel
property ListModel popularCommunitiesModel: Models.curatedCommunitiesModel
property ListModel tagsModel: Models.tagsModel
property string searchText: ""
property int layoutVMargin: 70
property int layoutHMargin: 64
property int titlePixelSize: 28
property int subtitlePixelSize: 17
property int stylePadding: 16
function navigateToCommunity(communityId) {
console.info("Clicked community ID: " + communityId)
}
}
contentHeight: column.height + d.layoutVMargin
contentWidth: column.width + d.layoutHMargin
clip: true
ColumnLayout {
id: column
spacing: 18
StatusBaseText {
Layout.topMargin: d.layoutVMargin
Layout.leftMargin: d.layoutHMargin
text: qsTr("Find community")
font.weight: Font.Bold
font.pixelSize: d.titlePixelSize
color: Theme.palette.directColor1
}
// Tags definition - Now hidden - Out of scope
// TODO: Replace by `StatusListItemTagRow`
Row {
visible: d.tagsModel.count > 0
Layout.leftMargin: d.layoutHMargin
Layout.rightMargin: d.layoutHMargin
width: 1234 // by design
spacing: d.stylePadding/2
Repeater {
model: d.tagsModel
delegate: StatusListItemTag {
border.color: Theme.palette.baseColor2
color: "transparent"
height: 32
radius: 36
closeButtonVisible: false
icon.emoji: model.emoji
icon.height: 32
icon.width: icon.height
icon.color: "transparent"
icon.isLetterIdenticon: true
title: model.name
titleText.font.pixelSize: 15
titleText.color: Theme.palette.primaryColor1
}
}
}
StatusBaseText {
Layout.leftMargin: d.layoutHMargin
Layout.topMargin: 20
text: qsTr("Featured")
font.weight: Font.Bold
font.pixelSize: d.subtitlePixelSize
color: Theme.palette.directColor1
}
GridLayout {
id: featuredGrid
Layout.leftMargin: d.layoutHMargin
columns: 3
columnSpacing: d.stylePadding
rowSpacing: d.stylePadding
Repeater {
model: d.featuredCommunitiesModel
delegate: StatusCommunityCard {
locale: "es"
communityId: model.communityId
loaded: model.available
logo: model.logo
name: model.name
description: model.description
members: model.members
popularity: model.popularity
communityColor: model.communityColor
categories: ListModel {
ListElement { name: "sport"; emoji: "🎾"}
ListElement { name: "food"; emoji: "🥑"}
ListElement { name: "privacy"; emoji: "👻"}
}
onClicked: { d.navigateToCommunity(communityId) }
}
}
}
StatusBaseText {
Layout.leftMargin: d.layoutHMargin
Layout.topMargin: 20
text: qsTr("Popular")
font.weight: Font.Bold
font.pixelSize: d.subtitlePixelSize
color: Theme.palette.directColor1
}
GridLayout {
Layout.leftMargin: d.layoutHMargin
columns: 3
columnSpacing: d.stylePadding
rowSpacing: d.stylePadding
Repeater {
model: d.popularCommunitiesModel
delegate: StatusCommunityCard {
locale: "es"
communityId: model.communityId
loaded: model.available
logo: model.logo
name: model.name
description: model.description
members: model.members
activeUsers: model.activeUsers
popularity: model.popularity
tokenLogo: model.tokenLogo
isPrivate: model.isPrivate
banner: model.banner
onClicked: { d.navigateToCommunity(communityId) }
}
}
}
}
}
+25 -16
View File
@@ -33,7 +33,7 @@ StatusAppThreePanelLayout {
chatInfoButton.title: "CryptoKitties"
chatInfoButton.subTitle: "128 Members"
chatInfoButton.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
chatInfoButton.image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
chatInfoButton.icon.color: Theme.palette.miscColor6
chatInfoButton.onClicked: { chatInfoButtonClicked(); }
@@ -59,7 +59,7 @@ StatusAppThreePanelLayout {
}
}
ScrollView {
StatusScrollView {
id: scrollView
anchors.top: statusChatInfoToolBar.bottom
@@ -166,13 +166,10 @@ StatusAppThreePanelLayout {
centerPanel: Item {
StatusChatToolBar {
id: statusChatToolBar
anchors.top: parent.top
width: parent.width
chatInfoButton.title: "general"
chatInfoButton.subTitle: "Community Chat"
chatInfoButton.icon.color: Theme.palette.miscColor6
chatInfoButton.type: StatusChatInfoButton.Type.CommunityChat
width: parent.width
toolbarComponent: statusChatInfoButton
onSearchButtonClicked: {
searchButton.highlighted = !searchButton.highlighted;
searchPopup.setSearchSelection(communityDetailModalTitle,
@@ -184,6 +181,18 @@ StatusAppThreePanelLayout {
onMembersButtonClicked: {
root.showRightPanel = !root.showRightPanel;
}
Component {
id: statusChatInfoButton
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "general"
subTitle: "Community Chat"
icon.color: Theme.palette.miscColor6
type: StatusChatInfoButton.Type.CommunityChat
}
}
}
StatusSearchPopup {
@@ -258,15 +267,15 @@ StatusAppThreePanelLayout {
model: Models.membersListModel
delegate: StatusMemberListItem {
implicitWidth: parent.width
nickName: model.nickName
userName: model.name
chatKey: model.publicId
trustIndicator: model.trustIndicator
isMutualContact: model.isMutualContact
nickName: model.localNickname
userName: model.displayName
pubKey: model.pubKey
isVerified: model.isVerified
isUntrustworthy: model.isUntrustworthy
isContact: model.isContact
image.source: model.icon
image.isIdenticon: model.isIdenticon
isOnline: model.onlineStatus
ringSettings.ringSpecModel: model.ringSpecModel
image.isIdenticon: false
status: model.onlineStatus
}
}
}
@@ -3,6 +3,7 @@ import QtQuick.Controls 2.14
import StatusQ.Components 0.1
import StatusQ.Layout 0.1
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import "data" 1.0
@@ -21,7 +22,7 @@ StatusAppTwoPanelLayout {
text: "Profile"
}
ScrollView {
StatusScrollView {
anchors.top: profileHeadline.bottom
anchors.topMargin: 16
anchors.bottom: parent.bottom
+283 -98
View File
@@ -316,9 +316,9 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
//dummy search popup models
property var searchResultsA: ListModel {
ListElement { itemId: "i1"; titleId: "t1"; title: "@Flea"; sectionName: "Messages"; time: "18:55 AM"; content: "lorem ipsum <font color='#4360DF'>@Nick</font> dolor sit amet";
image: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg";
image: "qrc:/demoapp/data/profile-image-1.jpeg";
color: "orange";
badgeImage: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg";
badgeImage: "qrc:/demoapp/data/profile-image-1.jpeg";
badgePrimaryText: "CryptoKities";
badgeSecondaryText: "";
badgeIconColor: "";
@@ -361,7 +361,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
ListElement {
value: "sub_item_1_1"
text: "Profile image item"
imageSource: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
imageSource: "qrc:/demoapp/data/profile-image-1.jpeg"
iconName: ""
iconColor: ""
},
@@ -375,7 +375,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
ListElement {
value: "item_2"
title: "Community item";
imageSource: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
imageSource: "qrc:/demoapp/data/profile-image-1.jpeg"
iconName: ""
iconColor: ""
subItems: [
@@ -446,7 +446,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f5789"
isMutualContact: true
isContact: true
trustIndicator: StatusContactVerificationIcons.TrustedType.None
hasMention: false
editMode: false
@@ -475,7 +475,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f2333"
isMutualContact: true
isContact: true
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
hasMention: false
editMode: false
@@ -503,7 +503,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAkUlEQVR4nOzYwQmDQBQG4SSkl3SQyizDyuzAavTi0cPK8sPwM9/Rw8rw4KH7eZUwhMYQGkNoDKGpCfmmDl63/bh7vvx/78T7aiZiCI0hNMMbJL2FZs+vmYghNIbQTG+cp9smtf1qJmIIjSEKqZmIITSG0Azfa6W/qfxDvBhCY4hCaiZiCI0hNIbQGEJzBgAA///3pSBjX42sYAAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f2333"
isMutualContact: true
isContact: true
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
hasMention: false
editMode: false
@@ -531,7 +531,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f6789"
isMutualContact: false
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
hasMention: false
editMode: false
@@ -560,7 +560,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: true
isContact: true
trustIndicator: StatusContactVerificationIcons.TrustedType.None
hasMention: false
editMode: false
@@ -589,7 +589,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: false
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
hasMention: false
editMode: false
@@ -618,7 +618,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: false
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
hasMention: true
editMode: false
@@ -648,7 +648,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: false
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
hasMention: false
editMode: false
@@ -678,7 +678,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: false
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
hasMention: false
editMode: false
@@ -708,7 +708,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: false
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
hasMention: false
editMode: false
@@ -738,7 +738,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: false
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
hasMention: false
editMode: false
@@ -767,7 +767,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: false
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
hasMention: false
editMode: false
@@ -795,7 +795,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: true
isContact: true
trustIndicator: StatusContactVerificationIcons.TrustedType.None
hasMention: false
editMode: false
@@ -823,7 +823,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
chatKey: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
isMutualContact: true
isContact: true
trustIndicator: StatusContactVerificationIcons.TrustedType.None
hasMention: false
editMode: false
@@ -843,69 +843,50 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
property var membersListModel: ListModel {
id: membersList
ListElement {
nickName: "This is an example"
name: "Maria"
publicId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
isMutualContact: true
onlineStatus: true
localNickname: "This is an example"
displayName: "Maria"
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isVerified: true
isUntrustworthy: false
isContact: true
onlineStatus: 1
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
isIdenticon: true
ringSpecModel: [ ListElement {colorId: 13; segmentLength: 5},
ListElement {colorId: 31; segmentLength: 5},
ListElement {colorId: 10; segmentLength: 1},
ListElement {colorId: 2; segmentLength: 5},
ListElement {colorId: 26; segmentLength: 2},
ListElement {colorId: 19; segmentLength: 4},
ListElement {colorId: 28; segmentLength: 3} ]
isAdmin: false
}
ListElement {
nickName: ""
name: "carmen.eth"
publicId: "0x043a7ed78362567894688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
isMutualContact: false
onlineStatus: false
localNickname: ""
displayName: "carmen.eth"
pubKey: "0x043a7ed78362567894688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isVerified: false
isUntrustworthy: true
isContact: false
onlineStatus: 0
icon: ""
isIdenticon: false
isAdmin: false
}
ListElement {
nickName: "This girl I know from work"
name: "annabelle"
publicId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486dsfkjghyu2cf04"
trustIndicator: StatusContactVerificationIcons.TrustedType.None
isMutualContact: false
onlineStatus: true
localNickname: "This girl I know from work"
displayName: "annabelle"
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486dsfkjghyu2cf04"
isVerified: false
isUntrustworthy: false
isContact: false
onlineStatus: 1
isAdmin: false
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDK
ExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
ringSpecModel: [ ListElement {colorId: 11; segmentLength: 1},
ListElement {colorId: 23; segmentLength: 5},
ListElement {colorId: 23; segmentLength: 5},
ListElement {colorId: 10; segmentLength: 4},
ListElement {colorId: 15; segmentLength: 3},
ListElement {colorId: 26; segmentLength: 2},
ListElement {colorId: 29; segmentLength: 5} ]
}
ListElement {
nickName: "Mark Cuban"
name: "mark.eth"
publicId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc79872cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
isMutualContact: true
onlineStatus: false
localNickname: "Mark Cuban"
displayName: "mark.eth"
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc79872cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isVerified: false
isUntrustworthy: true
isContact: true
onlineStatus: 0
icon: ""
isIdenticon: false
ringSpecModel: [ ListElement {colorId: 0; segmentLength: 1},
ListElement {colorId: 28; segmentLength: 1},
ListElement {colorId: 31; segmentLength: 1},
ListElement {colorId: 22; segmentLength: 4},
ListElement {colorId: 28; segmentLength: 3},
ListElement {colorId: 27; segmentLength: 5},
ListElement {colorId: 7; segmentLength: 5},
ListElement {colorId: 13; segmentLength: 1},
ListElement {colorId: 25; segmentLength: 4}]
isAdmin: false
}
}
@@ -932,8 +913,19 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
notificationsCount: 0
}
ListElement {
sectionId: "demoApp"
sectionId: "examples"
sectionType: 101
name: "Examples"
active: false
image: ""
icon: "show"
color: ""
hasNotification: false
notificationsCount: 0
}
ListElement {
sectionId: "demoApp"
sectionType: 102
name: "Demo Application"
active: false
image: ""
@@ -968,8 +960,19 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
notificationsCount: 0
}
ListElement {
sectionId: "wallet"
sectionId: "communitiesPortal"
sectionType: 2
name: "Communities Portal"
active: false
image: ""
icon: "communities"
color: ""
hasNotification: false
notificationsCount: 0
}
ListElement {
sectionId: "wallet"
sectionType: 3
name: "Wallet"
active: false
image: ""
@@ -980,7 +983,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
}
ListElement {
sectionId: "browser"
sectionType: 3
sectionType: 4
name: "Browser"
active: false
image: ""
@@ -1008,7 +1011,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "United States Dollar"
shortName: "USD"
symbol: "$"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
imageSource: "../../assets/twemoji/svg/1f4b4.svg"
category: ""
selected: false
}
@@ -1017,7 +1020,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "British Pound"
shortName: "GBP"
symbol: "£"
imageSource: "../../assets/twemoji/26x26/1f4b5.png"
imageSource: "../../assets/twemoji/svg/1f4b5.svg"
category: ""
selected: false
}
@@ -1026,7 +1029,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Euro"
shortName: "EUR"
symbol: "€"
imageSource: "../../assets/twemoji/26x26/1f4b6.png"
imageSource: "../../assets/twemoji/svg/1f4b6.svg"
category: ""
selected: true
}
@@ -1035,7 +1038,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Shout Korean Won"
shortName: "KRW"
symbol: "₩"
imageSource: "../../assets/twemoji/26x26/1f4b8.png"
imageSource: "../../assets/twemoji/svg/1f4b8.svg"
category: ""
selected: false
}
@@ -1044,7 +1047,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Ethereum"
shortName: "ETH"
symbol: "Ξ"
imageSource: "../../assets/twemoji/26x26/1f4b7.png"
imageSource: "../../assets/twemoji/svg/1f4b7.svg"
category: "Tokens"
selected: true
}
@@ -1053,7 +1056,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Bitcoin"
shortName: "BTC"
symbol: "฿"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
imageSource: "../../assets/twemoji/svg/1f4b4.svg"
category: "Tokens"
selected: false
}
@@ -1062,7 +1065,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Status Network Token"
shortName: "SNT"
symbol: ""
imageSource: "../../assets/twemoji/26x26/1f4b8.png"
imageSource: "../../assets/twemoji/svg/1f4b8.svg"
category: "Tokens"
selected: false
}
@@ -1072,7 +1075,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Emirati Dirham"
shortName: "AED"
symbol: "د.إ"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
imageSource: "../../assets/twemoji/svg/1f4b4.svg"
category: "Other Fiat"
selected: false
}
@@ -1081,7 +1084,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Afghani"
shortName: "AFN"
symbol: "؋"
imageSource: "../../assets/twemoji/26x26/1f4b7.png"
imageSource: "../../assets/twemoji/svg/1f4b7.svg"
category: "Other Fiat"
selected: false
}
@@ -1090,7 +1093,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Argentine Peso"
shortName: "AFN"
symbol: "$"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
imageSource: "../../assets/twemoji/svg/1f4b4.svg"
category: "Other Fiat"
selected: false
}
@@ -1102,7 +1105,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "United States Dollar"
shortName: "USD"
symbol: "$"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
imageSource: "../../assets/twemoji/svg/1f4b4.svg"
category: ""
selected: false
}
@@ -1111,7 +1114,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "British Pound"
shortName: "GBP"
symbol: "£"
imageSource: "../../assets/twemoji/26x26/1f4b5.png"
imageSource: "../../assets/twemoji/svg/1f4b5.svg"
category: ""
selected: false
}
@@ -1120,7 +1123,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Euro"
shortName: "EUR"
symbol: "€"
imageSource: "../../assets/twemoji/26x26/1f4b6.png"
imageSource: "../../assets/twemoji/svg/1f4b6.svg"
category: ""
selected: true
}
@@ -1129,7 +1132,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Shout Korean Won"
shortName: "KRW"
symbol: "₩"
imageSource: "../../assets/twemoji/26x26/1f4b8.png"
imageSource: "../../assets/twemoji/svg/1f4b8.svg"
category: ""
selected: false
}
@@ -1138,7 +1141,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Ethereum"
shortName: "ETH"
symbol: "Ξ"
imageSource: "../../assets/twemoji/26x26/1f4b7.png"
imageSource: "../../assets/twemoji/svg/1f4b7.svg"
category: "Tokens"
selected: true
}
@@ -1147,7 +1150,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Bitcoin"
shortName: "BTC"
symbol: "฿"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
imageSource: "../../assets/twemoji/svg/1f4b4.svg"
category: "Tokens"
selected: false
}
@@ -1156,7 +1159,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Status Network Token"
shortName: "SNT"
symbol: ""
imageSource: "../../assets/twemoji/26x26/1f4b8.png"
imageSource: "../../assets/twemoji/svg/1f4b8.svg"
category: "Tokens"
selected: false
}
@@ -1166,7 +1169,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Emirati Dirham"
shortName: "AED"
symbol: "د.إ"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
imageSource: "../../assets/twemoji/svg/1f4b4.svg"
category: "Other Fiat"
selected: false
}
@@ -1175,7 +1178,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Afghani"
shortName: "AFN"
symbol: "؋"
imageSource: "../../assets/twemoji/26x26/1f4b7.png"
imageSource: "../../assets/twemoji/svg/1f4b7.svg"
category: "Other Fiat"
selected: false
}
@@ -1184,7 +1187,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
name: "Argentine Peso"
shortName: "AFN"
symbol: "$"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
imageSource: "../../assets/twemoji/svg/1f4b4.svg"
category: "Other Fiat"
selected: false
}
@@ -1195,7 +1198,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
key: 0
name: "English"
shortName: "English"
imageSource: "../../assets/twemoji/26x26/1f1ec-1f1e7.png"
imageSource: "../../assets/twemoji/svg/1f1ec-1f1e7.svg"
category: ""
selected: false
}
@@ -1203,7 +1206,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
key: 1
name: "Korean"
shortName: "한국어"
imageSource: "../../assets/twemoji/26x26/1f1f0-1f1f7.png"
imageSource: "../../assets/twemoji/svg/1f1f0-1f1f7.svg"
category: ""
selected: false
}
@@ -1211,7 +1214,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
key: 2
name: "Portuguese (Brazilian)"
shortName: "Português"
imageSource: "../../assets/twemoji/26x26/1f1e7-1f1f7.png"
imageSource: "../../assets/twemoji/svg/1f1e7-1f1f7.svg"
category: ""
selected: true
}
@@ -1219,7 +1222,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
key: 3
name: "Dutch"
shortName: "Nederlands"
imageSource: "../../assets/twemoji/26x26/1f1f3-1f1f1.png"
imageSource: "../../assets/twemoji/svg/1f1f3-1f1f1.svg"
category: "Beta Languages"
selected: false
}
@@ -1227,7 +1230,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
key: 4
name: "Indonesian"
shortName: "Bahasa Indonesia"
imageSource: "../../assets/twemoji/26x26/1f1ee-1f1e9.png"
imageSource: "../../assets/twemoji/svg/1f1ee-1f1e9.svg"
category: "Beta Languages"
selected: false
}
@@ -1235,7 +1238,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
key: 5
name: "Spanish"
shortName: "Español"
imageSource: "../../assets/twemoji/26x26/1f1ea-1f1e6.png"
imageSource: "../../assets/twemoji/svg/1f1ea-1f1e6.svg"
category: "Beta Languages"
selected: false
}
@@ -1306,4 +1309,186 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
selected: false
}
}
property ListModel featuredCommunitiesModel : ListModel {
ListElement {
name: "CryptoKitties";
description: "A community of cat lovers, meow!";
logo:"qrc:/images/CryptoKitties.png";
members: 1045;
categories: [];
communityId: "341";
available: true;
popularity: 1;
communityColor: "pink"
}
ListElement {
name: "Friends with Benefits";
description: "A group chat full of out favorite thinkers and creators.";
logo:"qrc:/images/FriendsBenefits.png";
members: 452;
categories: [];
communityId: "232";
available: true;
popularity: 2;
communityColor: "grey"
}
ListElement {
name: "Status Hi!!";
description: "A new community description with long long long and repetitive repetitive repetitive repetitive explanation!!";
logo:"qrc:/images/SNT.png";
members: 89;
categories: [];
communityId: "223";
available: true;
popularity: 3
communityColor: "blue"
}
}
property ListModel curatedCommunitiesModel : ListModel {
ListElement {
name: "Status.im";
description: "Your portal to Web3. Secure wallet. dApp browser. Private messaging. All-in-one.";
logo: "qrc:/images/SNT.png";
banner: "qrc:/images/CommunityBanner1.png";
members: 299500;
activeUsers: 71400;
categories: [];
communityId: "1";
available: true;
popularity: 1
isPrivate: true
tokenLogo: "qrc:/images/SNT.png";
}
ListElement {
name: "SuperRare";
description: "The future of CryptoArt markets—a network governed by artists, collectors and curators.";
logo:"qrc:/images/SR.png";
banner: "qrc:/images/SuperRareCommunityBanner.png";
members: 299500;
activeUsers: 71400;
categories: [];
communityId: "2";
available: true;
popularity: 2
isPrivate: true
tokenLogo: "qrc:/images/SRToken.png";
}
ListElement {
name: "Coinbase";
description: "Jump start your crypto portfolio with the easiest place to buy and sell crypto. ";
logo:"qrc:/images/Coinbase.png";
banner: "qrc:/images/CoinBaseCommunityBanner.png";
members: 4900000;
activeUsers: 245600;
categories: [];
communityId: "3";
available: true;
popularity: 3
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "Rarible";
description: "Multichain community-centric NFT marketplace. Create, sell and collect NFTs.";
logo:"qrc:/images/Rarible.png";
banner: "qrc:/images/RaribleCommunityBanner.png";
members: 629200;
activeUsers: 112100;
categories: [];
communityId: "4";
available: true;
popularity: 4
isPrivate: true
tokenLogo: "qrc:/images/RARI.png";
}
ListElement {
name: "Spotify";
description: "Listening is everything";
logo:"qrc:/images/Spotify.png";
banner: "qrc:/images/SpotifyCommunityBanner.png";
members: 207500;
activeUsers: 52200;
categories: [];
communityId: "5";
available: true;
popularity: 5
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "Dribbble";
description: "Open source platform to write and distribute decentralized applications..";
logo:"qrc:/images/Fluff.png";
banner: "qrc:/images/DribbbleCommunityBanner.png";
members: 2300000;
activeUsers: 112100;
categories: [];
communityId: "6";
available: true;
popularity: 6
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "Status.im";
description: "Your portal to Web3. Secure wallet. dApp browser. Private messaging. All-in-one.";
logo:"qrc:/images/SNT.png";
banner: ""
members: 299500;
activeUsers: 71400;
categories: [];
communityId: "7";
available: true;
popularity: 1
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "CryptoPunks";
description: "Community description goes here. Community description goes here. Community description goes here. Community description goes here. Community description goes here. Community description goes here.";
logo:"qrc:/images/CryptoPunks.png";
banner: "";
members: 4900;
activeUsers: 245600;
categories: [];
communityId: "8";
available: false;
popularity: 8
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "Socks";
description: "Community description goes here.";
logo:"qrc:/images/Socks.png";
banner: "";
members: 4900;
activeUsers: 245600;
categories: [];
communityId: "9";
available: false;
popularity: 9
isPrivate: false
tokenLogo: "";
}
}
property ListModel tagsModel : ListModel {
ListElement { name: "gaming"; emoji: "🎮"}
ListElement { name: "art"; emoji: "🖼️"}
ListElement { name: "crypto"; emoji: "💸"}
ListElement { name: "nsfw"; emoji: "🍆"}
ListElement { name: "markets"; emoji: "💎"}
ListElement { name: "defi"; emoji: "📈"}
ListElement { name: "travel"; emoji: "🚁"}
ListElement { name: "web3"; emoji: "🗺"}
ListElement { name: "sport"; emoji: "🎾"}
ListElement { name: "food"; emoji: "🥑"}
ListElement { name: "enviroment"; emoji: "☠️"}
ListElement { name: "privacy"; emoji: "👻"}
}
property var communityTags :{"Activism":"✊","Art":"🎨","Blockchain":"🔗","Books & blogs":"📚","Career":"💼","Collaboration":"🤝","Commerce":"🛒","Crypto":"Ξ","Culture":"🎎","DAO":"🚀","DIY":"🔨","DeFi":"📈","Design":"🧩","Education":"🎒","Entertainment":"🍿","Environment":"🌿","Event":"🗓","Fantasy":"🧙‍♂️","Fashion":"🧦","Food":"🌶","Gaming":"🎮","Global":"🌍","Health":"🧠","Hobby":"📐","Innovation":"🧪","Language":"📜","Lifestyle":"✨","Local":"📍","Love":"❤️","Markets":"💎","Movies & TV":"🎞","Music":"🎶","NFT":"🖼","NSFW":"🍆","News":"🗞","Non-profit":"🙏","Org":"🏢","Pets":"🐶","Play":"🎲","Podcast":"🎙️","Politics":"🗳️","Privacy":"👻","Product":"🍱","Psyche":"🍁","Security":"🔒","Social":"☕","Software dev":"👩‍💻","Sports":"⚽️","Tech":"📱","Travel":"🗺","Vehicles":"🚕","Web3":"🌐"}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

+154
View File
@@ -0,0 +1,154 @@
import QtQuick 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Utils 0.1
import SortFilterProxyModel 0.2
ColumnLayout {
id: root
RowLayout {
Layout.fillWidth: true
StatusIconTextButton {
id: sortBtn
property int sortOrder: -1
statusIcon: {
if (sortOrder == Qt.AscendingOrder) return "chevron-down"
if (sortOrder == Qt.DescendingOrder) return "chevron-up"
return "remove"
}
onClicked: {
var st = sortOrder + 1
sortOrder = st > 1 ? -1 : st
}
}
StatusInput {
id: searchInput
Layout.fillWidth: true
input.icon.name: "search"
placeholderText: "nickname.."
}
StatusIconTabButton {
id: contactBtn
icon.name: "tiny/tiny-contact"
identicon.icon.color: Theme.palette.primaryColor1
onClicked: highlighted = !highlighted
}
StatusIconTabButton {
id: verifiedBtn
icon.name: "tiny/tiny-checkmark"
identicon.icon.color: Theme.palette.primaryColor1
onClicked: highlighted = !highlighted
}
}
ListView {
Layout.fillWidth: true
implicitHeight: contentItem.childrenRect.height
spacing: 4
model: SortFilterProxyModel {
sourceModel: d.users
sorters: StringSorter {
enabled: sortBtn.sortOrder !== -1
roleName: "nick"
sortOrder: sortBtn.sortOrder
}
filters: [
ExpressionFilter {
expression: model.nick.startsWith(searchInput.text)
},
AllOf {
enabled: contactBtn.highlighted || verifiedBtn.highlighted
ValueFilter {
enabled: contactBtn.highlighted
roleName: "isContact"
value: true
}
ValueFilter {
enabled: verifiedBtn.highlighted
roleName: "isVerified"
value: true
}
}
]
}
delegate: StatusMemberListItem {
width: parent.width
userName: model.name
nickName: model.nick
isVerified: model.isVerified
isContact: model.isContact
}
}
QtObject {
id: d
readonly property ListModel users: ListModel {
ListElement {
name: "Richard"
nick: "Ricky"
isVerified: true
isContact: true
}
ListElement {
name: "Susan"
nick: "Sue"
isVerified: false
isContact: false
}
ListElement {
name: "Edward"
nick: "Ed"
isVerified: true
isContact: false
}
ListElement {
name: "Toomas"
nick: "Tommy"
isVerified: false
isContact: false
}
ListElement {
name: "Elizabeth"
nick: "Bess"
isVerified: true
isContact: true
}
ListElement {
name: "Thomas"
nick: "Tom"
isVerified: false
isContact: true
}
ListElement {
name: "Fernando"
nick: "Alonso"
isVerified: false
isContact: true
}
ListElement {
name: "Alexander"
nick: "Alex"
isVerified: true
isContact: false
}
}
}
}
-6
View File
@@ -1,6 +0,0 @@
#include "handler.h"
Handler::Handler(QObject *parent) : QObject(parent)
{
}
-16
View File
@@ -1,16 +0,0 @@
#ifndef HANDLER_H
#define HANDLER_H
#include <QObject>
class Handler : public QObject
{
Q_OBJECT
public:
explicit Handler(QObject *parent = nullptr);
signals:
void restartQml();
};
#endif // HANDLER_H
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

+6
View File
@@ -4,6 +4,8 @@
#include "sandboxapp.h"
#include <qqmlsortfilterproxymodeltypes.h>
int main(int argc, char *argv[])
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
@@ -12,6 +14,10 @@ int main(int argc, char *argv[])
SandboxApp app(argc, argv);
qqsfpm::registerTypes();
qputenv("QT_QUICK_CONTROLS_HOVER_ENABLED", QByteArrayLiteral("1"));
app.setOrganizationName("Status");
app.setOrganizationDomain("status.im");
app.setApplicationName("Sandbox");
+254 -179
View File
@@ -4,6 +4,7 @@ import QtQuick.Controls 2.14
import QtGraphicalEffects 1.13
import QtQuick.Layouts 1.14
import Qt.labs.settings 1.0
import QtQml.Models 2.14
import Sandbox 0.1
@@ -14,6 +15,8 @@ import StatusQ.Components 0.1
import StatusQ.Layout 0.1
import StatusQ.Platform 0.1
import SortFilterProxyModel 0.2
import "demoapp/data" 1.0
StatusWindow {
@@ -44,7 +47,8 @@ StatusWindow {
readonly property int nodeManagement: 4
readonly property int profileSettings: 5
readonly property int apiDocumentation: 100
readonly property int demoApp: 101
readonly property int examples: 101
readonly property int demoApp: 102
}
function setActiveItem(sectionId) {
@@ -87,13 +91,16 @@ StatusWindow {
if(model.sectionType === appSectionType.apiDocumentation)
{
stackView.push(libraryDocumentationCmp)
rootWindow.setActiveItem(sectionId)
}
else if(model.sectionType === appSectionType.examples)
{
stackView.push(examplesCmp)
}
else if(model.sectionType === appSectionType.demoApp)
{
stackView.push(demoAppCmp)
rootWindow.setActiveItem(model.sectionId)
}
rootWindow.setActiveItem(model.sectionId)
}
}
}
@@ -132,186 +139,206 @@ StatusWindow {
storeSettings.fillPage = false
}
leftPanel: Item {
leftPanel: StatusScrollView {
anchors.fill: parent
ScrollView {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
contentHeight: navigation.height + 56
contentWidth: navigation.width
clip: true
Column {
id: navigation
anchors.top: parent.top
anchors.topMargin: 48
anchors.horizontalCenter: parent.horizontalCenter
spacing: 0
anchors.topMargin: 48
StatusListSectionHeadline { text: "StatusQ.Core" }
StatusNavigationListItem {
title: "Icons"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
Column {
id: navigation
spacing: 0
StatusListSectionHeadline { text: "StatusQ.Layout" }
StatusNavigationListItem {
title: "Layouts"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title.substring(0, title.length - 1));
}
StatusListSectionHeadline { text: "StatusQ.Core" }
StatusNavigationListItem {
title: "Icons"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusListSectionHeadline { text: "StatusQ.Controls" }
StatusNavigationListItem {
title: "Buttons"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusNavigationListItem {
title: "StatusSwitchTab"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page("StatusTabSwitch");
}
StatusNavigationListItem {
title: "StatusChatCommandButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "Controls"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusNavigationListItem {
title: "StatusTabBarButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusTabBarIconButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusInput"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusSelect"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusAccountSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusAssetSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusColorSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusWalletColorButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusWalletColorSelect"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusPasswordStrengthIndicator"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusPinInput"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusListSectionHeadline { text: "StatusQ.Components" }
StatusNavigationListItem {
title: "StatusAddress"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "List Items"
selected: viewLoader.source.toString().includes(title.replace(/\s+/g, ''))
onClicked: mainPageView.control(title.replace(/\s+/g, ''));
}
StatusNavigationListItem {
title: "StatusChatInfoToolBar"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "Others"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusNavigationListItem {
title: "StatusExpandableItem"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page("StatusExpandableSettingsItem");
}
StatusNavigationListItem {
title: "StatusTagSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusToastMessage"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusWizardStepper"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusListPicker"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusListSectionHeadline { text: "StatusQ.Popup" }
StatusNavigationListItem {
title: "StatusPopupMenu"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusListSectionHeadline { text: "StatusQ.Layout" }
StatusNavigationListItem {
title: "Layouts"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title.substring(0, title.length - 1));
}
StatusNavigationListItem {
title: "StatusModal"
selected: viewLoader.source.toString().includes("Popups")
onClicked: mainPageView.control("Popups");
}
StatusListSectionHeadline { text: "StatusQ.Platform" }
StatusNavigationListItem {
title: "StatusMacNotification"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusColorSelectorGrid"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusImageCropPanel"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title, true);
}
StatusListSectionHeadline { text: "StatusQ.Controls" }
StatusNavigationListItem {
title: "Buttons"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusNavigationListItem {
title: "StatusSwitchTab"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page("StatusTabSwitch");
}
StatusNavigationListItem {
title: "StatusChatCommandButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "Controls"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusNavigationListItem {
title: "StatusTabBarButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusTabBarIconButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusInput"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusTextArea"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusSelect"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusComboBox"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusAccountSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusColorSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusWalletColorButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusWalletColorSelect"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusPasswordStrengthIndicator"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusPinInput"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusListSectionHeadline { text: "StatusQ.Components" }
StatusNavigationListItem {
title: "StatusAddress"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "List Items"
selected: viewLoader.source.toString().includes(title.replace(/\s+/g, ''))
onClicked: mainPageView.control(title.replace(/\s+/g, ''));
}
StatusNavigationListItem {
title: "StatusChatInfoToolBar"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "Others"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusNavigationListItem {
title: "StatusExpandableItem"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page("StatusExpandableSettingsItem");
}
StatusNavigationListItem {
title: "StatusTagSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusToastMessage"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusWizardStepper"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusListPicker"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusCommunityCard"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusCommunityTags"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusListSectionHeadline { text: "StatusQ.Popup" }
StatusNavigationListItem {
title: "StatusPopupMenu"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusModal"
selected: viewLoader.source.toString().includes("Popups")
onClicked: mainPageView.control("Popups");
}
StatusNavigationListItem {
title: "StatusDialog"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusListSectionHeadline { text: "StatusQ.Platform" }
StatusNavigationListItem {
title: "StatusMacNotification"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusColorSelectorGrid"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusImageCropPanel"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title, true);
}
StatusNavigationListItem {
title: "StatusColorSpace"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title, true);
}
StatusNavigationListItem {
title: "StatusCard"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title, true);
}
}
}
@@ -320,7 +347,7 @@ StatusWindow {
id: rightPanel
anchors.fill: parent
ScrollView {
StatusScrollView {
visible: !storeSettings.fillPage
anchors.fill: parent
anchors.topMargin: 64
@@ -385,6 +412,53 @@ StatusWindow {
}
}
Component {
id: examplesCmp
StatusAppTwoPanelLayout {
id: examplesView
function example(name) {
examplesLoader.source = Qt.resolvedUrl("./examples/" + name + ".qml")
storeSettings.selectedExample = examplesLoader.source
}
readonly property string defaultExampleSource: example("FilteringSorting")
leftPanel: StatusScrollView {
id: examplesLeftPanel
anchors.fill: parent
anchors.topMargin: 48
ColumnLayout {
width: examplesLeftPanel.availableWidth
spacing: 0
StatusNavigationListItem {
Layout.fillWidth: true
title: "FilteringSorting"
selected: examplesLoader.source.toString().includes(title)
onClicked: examplesView.example(title)
}
}
}
rightPanel: StatusScrollView {
id: examplesRightPanel
anchors.fill: parent
anchors.margins: 64
anchors.topMargin: anchors.margins + 32
Loader {
id: examplesLoader
width: examplesRightPanel.availableWidth
source: storeSettings.selectedExample !== "" ? storeSettings.selectedExample : examplesView.defaultExampleSource
}
}
}
}
Component {
id: demoAppCmp
@@ -479,6 +553,7 @@ StatusWindow {
Settings {
id: storeSettings
property string selected: ""
property string selectedExample: ""
property bool lightTheme: true
property bool fillPage: false
}
+51 -47
View File
@@ -8,57 +8,61 @@ import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
Column {
spacing: 8
StatusAccountSelector {
id: accountSelector
accounts: ListModel {
ListElement {
name: "Pascal"
address: "0x1234567891011"
path: ""
color: "red"
publicKey: ""
walletType: "generated"
isChat: ""
currencyBalance: "1199.02"
assets: []
}
ListElement {
name: "Boris"
address: "0x123"
path: ""
color: "red"
publicKey: ""
walletType: "generated"
isChat: ""
currencyBalance: "0"
assets: []
}
ListElement {
name: "Alexandra"
address: "0x123"
path: ""
color: "yellow"
publicKey: ""
walletType: "generated"
isChat: ""
currencyBalance: "0"
assets: []
}
ListElement {
name: "Khushboo"
address: "0x123"
path: ""
color: "blue"
publicKey: ""
walletType: "generated"
isChat: ""
currencyBalance: "0"
assets: []
}
id: selector1
width: 300
accounts: accountsModel
}
ListModel {
id: accountsModel
ListElement {
name: "Pascal"
address: "0x1234567891011"
path: ""
color: "red"
publicKey: ""
walletType: "generated"
isChat: ""
currencyBalance: "1199.02"
assets: []
}
ListElement {
name: "Boris"
address: "0x123"
path: ""
color: "red"
publicKey: ""
walletType: "generated"
isChat: ""
currencyBalance: "42.42"
assets: []
}
ListElement {
name: "Alexandra"
address: "0x123"
path: ""
color: "yellow"
publicKey: ""
walletType: "generated"
isChat: ""
currencyBalance: "0"
assets: []
}
ListElement {
name: "Khushboo"
address: "0x123"
path: ""
color: "blue"
publicKey: ""
walletType: "watch" // Will be automatically filtered by StatusAccountSelector
isChat: ""
currencyBalance: "0"
assets: []
}
}
}
+82 -9
View File
@@ -2,24 +2,97 @@ import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Components 0.1
import Sandbox 0.1
Column {
spacing: 8
Item {
id: root
StatusAddress {
text: "0x9ce0056c5fc6bb9459a4dcfa35eaad8c1fee5ce9"
}
implicitWidth: mainLayout.implicitWidth
implicitHeight: mainLayout.implicitHeight
Item {
width: 200
height: childrenRect.height
GridLayout {
id: mainLayout
columns: 2
anchors.fill: parent
columnSpacing: 15
rowSpacing: 8
StatusBaseText { text: "StatusAddress\nsimple" }
StatusAddress {
text: "0x9ce0056c5fc6bb9459a4dcfa35eaad8c1fee5ce9"
}
StatusBaseText { text: "StatusAddress\nclick-expandable" }
StatusAddress {
text: "0x9ce0056c5fc6bb9459a4dcfa35eaad8c1fee5ce9"
Layout.preferredWidth: 200
expandable: true
width: parent.width
}
StatusBaseText { text: `StatusAddressPanel\nfont.pixelSize: 13, copyable, no frame`}
StatusAddressPanel {
address: "0xDC2c4826f6C56F61C1b9cC6Bb531d0Fe45402fC9"
font.pixelSize: 13
font.weight: Font.Normal
showFrame: false
onDoCopy: copyAction.text = address
}
StatusBaseText { text: `StatusAddressPanel\ncompact; width ${simpleAddressPanel.width}px ${simpleAddressPanel.height}px`}
StatusAddressPanel {
id: simpleAddressPanel
address: "0xd8593DEACe2f44dF35dd23fD2BAFC2daeC2ae033"
showCopy: false
expanded: false
onDoCopy: copyAction.text = address
expandable: true
}
StatusBaseText { text: "StatusAddressPanel\ncopy-icon, non-expandable" }
StatusAddressPanel {
address: "0xDd5A0755e99D66a583253372B569231968A6CF7b"
onDoCopy: copyAction.text = address
}
StatusBaseText { text: "StatusAddressPanel\ncopy hiden" }
StatusAddressPanel {
address: "0xd2D44C2A1E78975506e474Ecdc7E4F272D7e9A6c"
autHideCopyIcon: true
onDoCopy: copyAction.text = address
expandable: true
}
StatusBaseText { text: "StatusAddressPanel\ncopy hiden, non-expandable" }
StatusAddressPanel {
address: "0xd2a44BA31E78975506e474Ecdc7E4F272D7F3BC5"
autHideCopyIcon: true
expanded: false
onDoCopy: copyAction.text = address
}
Rectangle {
color: "lightblue"
Layout.fillWidth: true
Layout.columnSpan: mainLayout.columns
Layout.preferredHeight: 2
}
StatusBaseText {
text: qsTr("Copy Action: ")
}
StatusBaseText {
id: copyAction
}
}
}
-40
View File
@@ -1,40 +0,0 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import Sandbox 0.1
Column {
spacing: 8
StatusAssetSelector {
getCurrencyBalanceString: function (currencyBalance) {
return currencyBalance.toFixed(2) + " USD"
}
tokenAssetSourceFn: function (symbol) {
return "../../assets/img/icons/snt.svg"
}
assets: ListModel {
ListElement {
address: "0x1234"
name: "Status Network Token"
balance: "20"
symbol: "SNT"
currencyBalance: 9992.01
}
ListElement {
address: "0x1234"
name: "DAI Token"
balance: "15"
symbol: "DAI"
currencyBalance: 20.00001
}
}
}
}
+239
View File
@@ -0,0 +1,239 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import Sandbox 0.1
import StatusQ.Core 0.1
import StatusQ.Core.Utils 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Components 0.1
Item {
ColumnLayout {
id: layout
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
spacing: 20
RowLayout {
Layout.fillWidth: true
StatusCard {
id: card
Layout.alignment: Qt.AlignVCenter
primaryText: "Mainnet"
secondaryText: state === "unavailable" ? "No Gas" : "75"
tertiaryText: state === "unpreferred" ? "UNPREFERRED" : "BALANCE: " + 250
cardIconName: "status"
advancedInputText: "75"
disabledText: "Disabled"
}
StatusComboBox {
Layout.alignment: Qt.AlignVCenter
Layout.maximumWidth: 200
label: "Card State"
onCurrentValueChanged: card.state = currentValue
model: ListModel {
ListElement {
name: "default"
}
ListElement {
name: "unavailable"
}
ListElement {
name: "error"
}
ListElement {
name: "unpreferred"
}
}
}
StatusCheckBox {
Layout.alignment: Qt.AlignVCenter
text: "advancedMode"
font.family: Theme.palette.monoFont.name
onClicked: {
card.advancedMode = checked
}
}
}
Rectangle {
height: 1
width: 700
color: "black"
}
// Below is an example on how to implement the network routing using StatusCard and Canvas, also the function in Utils to draw an arrow
Row {
id: cards
spacing: 200
Column {
id: leftColumn
spacing: 20
Repeater {
model: fromNetworksList
StatusCard {
primaryText: name
secondaryText: balance === 0 ? "No Balance" : !hasGas ? "No Gas" : tokensToSend
tertiaryText: "BALANCE: " + balance
state: balance === 0 || !hasGas ? "unavailable" : "default"
cardIconName: iconName
advancedMode: card.advancedMode
advancedInputText: tokensToSend
disabledText: "Disabled"
}
}
}
Column {
id: rightColumn
spacing: 20
Repeater {
model: toNetworksList
StatusCard {
primaryText: name
secondaryText: tokensToReceive
tertiaryText: ""
state: preferred ? "default" : "unprefeered"
cardIconName: iconName
opacity: preferred ? 1 : 0
advancedMode: card.advancedMode
advancedInputText: tokensToReceive
disabledText: "Disabled"
}
}
}
}
}
Canvas {
id: canvas
x: layout.x + leftColumn.x
y: cards.y
width: cards.width
height: cards.height
function clear() {
var ctx = getContext("2d");
ctx.reset()
}
onPaint: {
// Get the canvas context
var ctx = getContext("2d");
for(var i = 0; i< fromNetworksList.count; i++) {
if(fromNetworksList.get(i).routedTo !== "") {
for(var j = 0; j< toNetworksList.count; j++) {
if(fromNetworksList.get(i).routedTo === toNetworksList.get(j).name) {
Utils.drawArrow(ctx, leftColumn.children[i].x + leftColumn.children[i].width,
leftColumn.children[i].y + leftColumn.children[i].height/2,
rightColumn.x + rightColumn.children[j].x,
rightColumn.children[j].y + rightColumn.children[j].height/2,
'#627EEA')
}
}
}
}
}
}
ListModel {
id: toNetworksList
ListElement {
name: "Mainnet"
iconName: "status"
tokensToReceive: 75
preferred: true
}
ListElement {
name: "Aztec"
iconName: "status"
tokensToReceive: 0
preferred: false
}
ListElement {
name: "Hermez"
iconName: "status"
tokensToReceive: 75
preferred: true
}
ListElement {
name: "Loppring"
iconName: "status"
tokensToReceive: 0
preferred: true
}
ListElement {
name: "Optimism"
iconName: "status"
tokensToReceive: 100
preferred: true
}
ListElement {
name: "zkSync"
iconName: "status"
tokensToReceive: 0
preferred: false
}
}
ListModel {
id: fromNetworksList
ListElement {
name: "Mainnet"
iconName: "status"
tokensToSend: 75
balance: 75
routedTo: "Mainnet"
hasGas: true
}
ListElement {
name: "Aztec"
iconName: "status"
tokensToSend: 0
balance: 75
routedTo: ""
hasGas: false
}
ListElement {
name: "Hermez"
iconName: "status"
tokensToSend: 75
balance: 75
routedTo: "Hermez"
hasGas: true
}
ListElement {
name: "Loppring"
iconName: "status"
tokensToSend: 0
balance: 0
routedTo: ""
hasGas: false
}
ListElement {
name: "Optimism"
iconName: "status"
tokensToSend: 75
balance: 75
routedTo: "Optimism"
hasGas: true
}
ListElement {
name: "zkSync"
iconName: "status"
tokensToSend: 25
balance: 25
routedTo: "Optimism"
hasGas: true
}
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ GridLayout {
StatusChatInfoToolBar {
chatInfoButton.title: "Cryptokitties"
chatInfoButton.subTitle: "128 Members"
chatInfoButton.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
chatInfoButton.image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
chatInfoButton.icon.color: Theme.palette.miscColor6
popupMenu: StatusPopupMenu {
+1 -1
View File
@@ -8,7 +8,7 @@ import StatusQ.Controls 0.1
import Sandbox 0.1
Column {
Row {
spacing: 8
StatusColorSelector {
+110
View File
@@ -0,0 +1,110 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import Sandbox 0.1
Item {
ColumnLayout {
anchors.centerIn: parent
StatusBaseText {
text: qsTr("Thickness")
}
StatusSlider {
id: thicknessSlider
from: colorSpace.width / 8
to: colorSpace.width / 16
value: colorSpace.width / 10
Layout.fillWidth: true
}
StatusBaseText {
text: qsTr("Min saturate: ") + colorSpace.minSaturate.toFixed(2)
}
StatusSlider {
id: minSatSlider
from: 0
to: 0.5
value: 0
Layout.fillWidth: true
}
StatusBaseText {
text: qsTr("Max saturate: ") + colorSpace.maxSaturate.toFixed(2)
}
StatusSlider {
id: maxSatSlider
from: 0.51
to: 1.0
value: 1.0
Layout.fillWidth: true
}
StatusBaseText {
text: qsTr("Min value: ") + colorSpace.minValue.toFixed(2)
}
StatusSlider {
id: minValSlider
from: 0
to: 0.5
value: 0
Layout.fillWidth: true
}
StatusBaseText {
text: qsTr("Max value: ") + colorSpace.maxValue.toFixed(2)
}
StatusSlider {
id: maxValSlider
from: 0.51
to: 1.0
value: 1.0
Layout.fillWidth: true
}
StatusColorSpace {
id: colorSpace
color: "#ed77eb"
thickness: thicknessSlider.value
minSaturate: minSatSlider.value
maxSaturate: maxSatSlider.value
minValue: minValSlider.value
maxValue: maxValSlider.value
}
StatusBaseText {
text: qsTr("Color") + ": " + colorSpace.color
}
Rectangle {
color: colorSpace.color
implicitHeight: 48
radius: 10
Layout.fillWidth: true
StatusBaseText {
anchors.centerIn: parent
color: Theme.palette.white
font.pixelSize: 15
text: "Quick brown fox jumps over the lazy dog"
}
}
StatusButton {
text: "Randomize"
onPressed: colorSpace.color = Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
}
}
}
+72
View File
@@ -0,0 +1,72 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import Sandbox 0.1
Column {
spacing: 20
ListModel {
id: commmonModel
ListElement {
name: "Pascal"
}
ListElement {
name: "Khushboo"
}
ListElement {
name: "Alexandra"
}
ListElement {
name: "Eric"
}
}
StatusComboBox {
id: combobox
label: "ComboBox"
model: commmonModel
}
StatusComboBox {
id: comboBox1
label: "ComboBox with custom delegate"
model: commmonModel
delegate: StatusItemDelegate {
width: comboBox1.control.width
highlighted: comboBox1.control.highlightedIndex === index
text: modelData
font: comboBox1.control.font
icon {
name: "filled-account"
color: Theme.palette.primaryColor1
}
enabled: index != 2
}
}
StatusComboBox {
model: commmonModel
label: "Disabled ComboBox"
enabled: false
}
StatusComboBox {
model: commmonModel
label: "ComboBox with validation error"
validationError: "Validation failed example"
}
StatusComboBox {
model: commmonModel
label: "Mirrored ComboBox"
LayoutMirroring.enabled: true
}
}
+47
View File
@@ -0,0 +1,47 @@
import QtQuick 2.0
import QtQuick.Layouts 1.13
import StatusQ.Components 0.1
import "../demoapp/data" 1.0
GridLayout {
QtObject {
id: d
function navigateToCommunity(communityID) {
console.log("Clicked community: " + communityID)
}
}
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
columns: 2
columnSpacing: 28
rowSpacing: 28
Repeater {
model: Models.curatedCommunitiesModel
delegate: StatusCommunityCard {
locale: "en"
communityId: model.communityId
loaded: model.available
logo: model.logo
banner: model.banner
name: model.name
description: model.description
members: model.members
activeUsers: model.activeUsers
popularity: model.popularity
isPrivate: model.isPrivate
tokenLogo: model.tokenLogo
categories: ListModel {
ListElement { name: "Crypto"; emoji: "🔗"}
ListElement { name: "Privacy"; emoji: "👻"}
ListElement { name: "Social"; emoji: "☕"}
}
onClicked: { d.navigateToCommunity(communityId) }
}
}
}
+83
View File
@@ -0,0 +1,83 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import Sandbox 0.1
import "../demoapp/data" 1.0
Item {
property int cntSelectedTags: 0
property int maxSelectedTags: 4
property ListModel tagsModel: ListModel {}
Component.onCompleted: {
tagsModel.clear();
for (const key of Object.keys(Models.communityTags)) {
tagsModel.append({ name: key, emoji: Models.communityTags[key], selected: false });
}
}
ColumnLayout {
id: column
anchors.centerIn: parent
width: 600
height: 500
spacing: 20
StatusInput {
id: tagsFilter
leftPadding: 0
rightPadding: 0
label: qsTr("Select tags that will fit your Community")
input.icon.name: "search"
placeholderText: qsTr("Search tags")
Layout.fillWidth: true
}
StatusCommunityTags {
filterString: tagsFilter.text
model: tagsModel
enabled: cntSelectedTags < maxSelectedTags
onClicked: {
cntSelectedTags++;
item.selected = true;
}
Layout.fillWidth: true
}
RowLayout {
StatusBaseText {
text: qsTr("Selected tags")
font.pixelSize: 15
Layout.fillWidth: true
}
StatusBaseText {
text: cntSelectedTags + "/" + maxSelectedTags
color: Theme.palette.baseColor1
font.pixelSize: 13
}
}
StatusCommunityTags {
model: tagsModel
showOnlySelected: true
onClicked: {
cntSelectedTags--;
item.selected = false;
}
Layout.fillWidth: true
}
Item {
Layout.fillHeight: true
}
}
}
+282
View File
@@ -0,0 +1,282 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtQml.Models 2.14
import StatusQ.Core 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups.Dialog 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1
ColumnLayout {
id: root
StatusButton {
text: "Content"
onClicked: contentDialog.open()
StatusDialog {
id: contentDialog
standardButtons: Dialog.ApplyRole
StatusBaseText {
anchors.fill: parent
text: "Content"
}
}
}
StatusButton {
text: "Title and content"
onClicked: titleContentDialog.open()
StatusDialog {
id: titleContentDialog
title: "Title"
StatusBaseText {
anchors.fill: parent
text: "Content"
}
}
}
StatusButton {
text: "No buttons"
onClicked: noButtonsDialog.open()
StatusDialog {
id: noButtonsDialog
title: "No buttons"
standardButtons: Dialog.NoButton
StatusBaseText {
anchors.fill: parent
text: "Content"
}
}
}
StatusButton {
text: "Long title"
onClicked: longTitleDialog.open()
StatusDialog {
id: longTitleDialog
title: "Long title long title Long title long title Long title long title"
StatusBaseText {
anchors.fill: parent
text: "Content"
}
}
}
StatusButton {
text: "Long title elided"
onClicked: longTitleElidedDialog.open()
StatusDialog {
id: longTitleElidedDialog
title: "Long title long title Long title long title Long title long title"
width: 400
StatusBaseText {
anchors.fill: parent
text: "Content"
}
}
}
StatusButton {
text: "Title subtitle"
onClicked: titleSubtitleDialog.open()
StatusDialog {
id: titleSubtitleDialog
title: "This title will be ignored"
header: StatusDialogHeader {
headline.title: "Title"
headline.subtitle: "Subtitle"
actions.closeButton.onClicked: titleSubtitleDialog.close()
}
StatusBaseText {
anchors.fill: parent
text: "Content"
}
}
}
StatusButton {
text: "Auto adjustable"
onClicked: autoAdjustableDialog.open()
StatusDialog {
id: autoAdjustableDialog
header: StatusDialogHeader {
headline.title: "Dialog size will auto adapt"
headline.subtitle: "To conent size"
actions.closeButton.onClicked: autoAdjustableDialog.close()
}
footer: StatusDialogFooter {
leftButtons: ObjectModel {
StatusRoundButton {
icon.name: "arrow-left"
onClicked: autoAdjustableDialogContent.implicitWidth -= 100
}
StatusRoundButton {
icon.name: "arrow-right"
onClicked: autoAdjustableDialogContent.implicitWidth += 100
}
}
rightButtons: ObjectModel {
StatusRoundButton {
icon.name: "arrow-down"
onClicked: autoAdjustableDialogContent.implicitHeight -= 100
}
StatusRoundButton {
icon.name: "arrow-up"
onClicked: autoAdjustableDialogContent.implicitHeight += 100
}
}
}
Rectangle {
id: autoAdjustableDialogContent
anchors.fill: parent
implicitWidth: 200
implicitHeight: 200
color: Theme.palette.primaryColor3
StatusBaseText {
anchors.centerIn: parent
text: "W: %1 H: %2\nIW: %3 IH: %4".arg(parent.width).arg(parent.height).arg(parent.implicitWidth).arg(parent.implicitHeight)
}
}
}
}
StatusButton {
text: "Complex dialog"
onClicked: complexDialog.open()
StatusDialog {
id: complexDialog
header: StatusDialogHeader {
id: dialogHeader
headline.title: "Complex dialog"
headline.subtitle: "identicon, title subtitle, custom actions"
leftComponent: StatusLetterIdenticon {
name: dialogHeader.headline.title
}
actions {
infoButton.visible: true
customButtons: ObjectModel {
StatusFlatRoundButton {
icon.name: "warning"
icon.width: 20
icon.height: 20
}
}
closeButton.onClicked: complexDialog.close()
}
}
footer: StatusDialogFooter {
leftButtons: ObjectModel {
StatusRoundButton {
icon.name: "arrow-left"
}
}
rightButtons: ObjectModel {
StatusButton {
text: "Custom cancel action"
type: StatusButton.Danger
}
StatusButton {
text: "Custom approve action"
}
}
}
ColumnLayout {
anchors.fill: parent
StatusBaseText {
text: "Content A"
}
StatusBaseText {
text: "Content B"
}
StatusBaseText {
text: "Content C"
}
}
}
}
StatusButton {
text: "Custom header/footer"
onClicked: customHeaderAndFooter.open()
StatusDialog {
id: customHeaderAndFooter
title: "No buttons"
header: Rectangle {
implicitHeight: customHeaderText.height * 2
implicitWidth: customHeaderText.width * 2
border.width: 2
color: Theme.palette.statusPopupMenu.hoverBackgroundColor
StatusBaseText {
id: customHeaderText
anchors.centerIn: parent
text: "Custom header"
}
}
footer: Rectangle {
implicitHeight: customHeaderText.height * 2
implicitWidth: customHeaderText.width * 2
border.width: 2
color: Theme.palette.statusPopupMenu.hoverBackgroundColor
StatusBaseText {
id: customFooter
anchors.centerIn: parent
text: "Custom footer"
}
}
StatusBaseText {
anchors.fill: parent
text: "Content"
}
}
}
}
@@ -74,7 +74,7 @@ Column {
type: StatusExpandableItem.Type.Secondary
expandable: true
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
primaryText: "CryptoKitties"
additionalText: "1456 USD"
expandableComponent: notImplemented
@@ -85,7 +85,7 @@ Column {
type: StatusExpandableItem.Type.Secondary
expandable: true
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
primaryText: "Adding Really long text to test scenario of having very long text along with tertiary text"
additionalText: "564.90 USD"
expandableComponent: notImplemented
+188 -23
View File
@@ -1,11 +1,20 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtQuick.Dialogs 1.3
import QtQml 2.14
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import QtGraphicalEffects 1.14
import StatusQ.Components 0.1
import StatusQ.Controls 0.1
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Popups 0.1
Item {
id: root
@@ -15,6 +24,12 @@ Item {
property var testControls: [ctrl1, ctrl2, ctrl3]
property bool globalStylePreferRound: true
property var testImageList: ["qrc:/demoapp/data/logo-test-image.png",
"qrc:/demoapp/data/profile-image-2.jpeg",
"qrc:/demoapp/data/profile-image-1.jpeg"]
property int testImageIndex: 0
property int testSpacing: 0
property int testFrameMargins: 10
ColumnLayout {
id: mainLayout
@@ -22,7 +37,12 @@ Item {
anchors.fill: parent
RowLayout {
spacing: root.testSpacing
ColumnLayout {
spacing: root.testSpacing
Layout.margins: root.testSpacing
Text {
text: `AR: ${ctrl1.aspectRatio.toFixed(2)}`
}
@@ -32,8 +52,9 @@ Item {
Layout.fillWidth: true
Layout.fillHeight: true
source: "qrc:/demoapp/data/logo-test-image.png"
source: root.testImageList[root.testImageIndex]
windowStyle: globalStylePreferRound ? StatusImageCrop.WindowStyle.Rounded : StatusImageCrop.WindowStyle.Rectangular
margins: root.testFrameMargins
}
Text {
text: `AR: ${ctrl2.aspectRatio.toFixed(2)}`
@@ -43,13 +64,15 @@ Item {
Layout.fillWidth: true
Layout.fillHeight: true
source: "qrc:/demoapp/data/logo-test-image.png"
source: root.testImageList[root.testImageIndex]
windowStyle: globalStylePreferRound ? StatusImageCrop.WindowStyle.Rectangular : StatusImageCrop.WindowStyle.Rounded
aspectRatio: 16/9
enableCheckers: true
margins: root.testFrameMargins + 2
}
}
ColumnLayout {
Layout.margins: root.testSpacing
Text {
text: `AR: ${ctrl3.aspectRatio.toFixed(2)}`
}
@@ -59,36 +82,178 @@ Item {
Layout.fillWidth: true
Layout.fillHeight: true
source: "qrc:/demoapp/data/logo-test-image.png"
source: root.testImageList[root.testImageIndex]
windowStyle: globalStylePreferRound ? StatusImageCrop.WindowStyle.Rounded : StatusImageCrop.WindowStyle.Rectangular
aspectRatio: 0.8
margins: root.testFrameMargins + 5.3
}
}
}
Shortcut {
sequence: StandardKey.ZoomIn
onActivated: {
for(let i in testControls) {
const c = testControls[i]
c.setCropRect(ctrl1.inflateRectBy(c.cropRect, -0.05))
RowLayout {
StatusButton {
text: qsTr("Cycle image")
onClicked: {
let newIndex = root.testImageIndex
newIndex++
if(newIndex >= root.testImageList.length)
newIndex = 0
root.testImageIndex = newIndex
}
}
}
Shortcut {
sequence: StandardKey.ZoomOut
onActivated: {
for(let i in testControls) {
const c = testControls[i]
c.setCropRect(ctrl1.inflateRectBy(c.cropRect, 0.05))
StatusButton {
text: qsTr("Cycle spacing")
onClicked: {
root.testSpacing += (root.testSpacing/2) + 1
if(root.testSpacing > 35)
root.testSpacing = 0
}
}
}
Shortcut {
sequences: ["Ctrl+W"]
onActivated: globalStylePreferRound = !globalStylePreferRound
StatusButton {
text: qsTr("Cycle frame margins")
onClicked: {
root.testFrameMargins += (root.testFrameMargins/2) + 1
if(root.testFrameMargins > 50)
root.testFrameMargins = 0
}
}
StatusButton {
text: qsTr("Load external image")
onClicked: workflowLoader.active = true
}
}
}
Loader {
id: workflowLoader
sourceComponent: workflowComponent
active: false
onStatusChanged: {
if(status === Loader.Ready) {
item.imageFileDialogTitle = qsTr("Test Title")
item.title = "Test popup"
item.acceptButtonText = "Load Custom Image"
item.chooseImageToCrop()
}
}
Connections {
target: workflowLoader.item
function onImageCropped(image, cropRect) {
ctrl1.source = image
ctrl2.source = image
ctrl3.source = image
}
function onCanceled() {
workflowLoader.active = false
}
}
}
Component {
id: workflowComponent
Item {
id: workflowItem
property alias aspectRatio: imageCropper.aspectRatio
property alias windowStyle: imageCropper.windowStyle
/*required*/ property string imageFileDialogTitle: ""
/*required*/ property string title: ""
/*required*/ property string acceptButtonText: ""
property bool roundedImage: true
signal imageCropped(var image, var cropRect)
signal canceled()
function chooseImageToCrop() {
fileDialog.open()
}
FileDialog {
id: fileDialog
title: workflowItem.imageFileDialogTitle
folder: workflowItem.userSelectedImage ? imageCropper.source.substr(0, imageCropper.source.lastIndexOf("/")) : shortcuts.pictures
nameFilters: [qsTr("Supported image formats (%1)").arg("*.jpg *.jpeg *.jfif *.webp *.png *.heif")]
onAccepted: {
if (fileDialog.fileUrls.length > 0) {
imageCropper.source = fileDialog.fileUrls[0]
imageCropperModal.open()
}
}
onRejected: workflowItem.canceled()
} // FileDialog
StatusModal {
id: imageCropperModal
header.title: workflowItem.title
anchors.centerIn: Overlay.overlay
width: workflowItem.roundedImage ? 480 : 580
onClosed: workflowItem.canceled()
StatusImageCropPanel {
id: imageCropper
implicitHeight: workflowItem.roundedImage ? 350 : 370
anchors {
fill: parent
leftMargin: 10 * 2
rightMargin: 10 * 2
topMargin: 15
bottomMargin: 15
}
margins: workflowItem.roundedImage ? 10 : 20
windowStyle: workflowItem.roundedImage ? StatusImageCrop.WindowStyle.Rounded : StatusImageCrop.WindowStyle.Rectangular
enableCheckers: true
}
rightButtons: [
StatusButton {
text: workflowItem.acceptButtonText
enabled: imageCropper.sourceSize.width > 0 && imageCropper.sourceSize.height > 0
onClicked: {
workflowItem.imageCropped(imageCropper.source, imageCropper.cropRect)
imageCropperModal.close()
}
}
]
} // StatusModal
} // Item
}
Shortcut {
sequence: StandardKey.ZoomIn
onActivated: {
for(let i in testControls) {
const c = testControls[i]
c.setCropRect(ctrl1.inflateRectBy(c.cropRect, -0.05))
}
}
}
Shortcut {
sequence: StandardKey.ZoomOut
onActivated: {
for(let i in testControls) {
const c = testControls[i]
c.setCropRect(ctrl1.inflateRectBy(c.cropRect, 0.05))
}
}
}
Shortcut {
sequences: ["Ctrl+W"]
onActivated: globalStylePreferRound = !globalStylePreferRound
}
}
+40 -23
View File
@@ -12,22 +12,22 @@ Column {
spacing: 8
StatusInput {
input.placeholderText: "Placeholder"
placeholderText: "Placeholder"
}
StatusInput {
label: "Label"
input.placeholderText: "Disabled"
placeholderText: "Disabled"
input.enabled: false
}
StatusInput {
input.placeholderText: "Clearable"
placeholderText: "Clearable"
input.clearable: true
}
StatusInput {
input.placeholderText: "Invalid"
placeholderText: "Invalid"
input.valid: false
}
@@ -35,25 +35,25 @@ Column {
label: "Label"
input.icon.name: "search"
input.placeholderText: "Input with icon"
placeholderText: "Input with icon"
}
StatusInput {
label: "Label"
input.placeholderText: "Placeholder"
placeholderText: "Placeholder"
input.clearable: true
}
StatusInput {
charLimit: 30
input.placeholderText: "Placeholder"
placeholderText: "Placeholder"
input.clearable: true
}
StatusInput {
label: "Label"
charLimit: 30
input.placeholderText: "Placeholder"
placeholderText: "Placeholder"
input.clearable: true
}
@@ -69,19 +69,34 @@ Column {
textEdit.input.anchors.leftMargin: 16
textEdit.input.anchors.rightMargin: 16
textEdit.input.anchors.topMargin: 11
textEdit.label: "Input with drop down selection list"
textEdit.label: "Input with drop down selection list" + (insertedWord ? ` (${insertedWord})` : "")
leftComponentText: "1"
inputList: ListModel {
ListElement {
seedWord: "add"
}
ListElement {
seedWord: "address"
}
ListElement {
seedWord: "panda"
}
ListElement {
seedWord: "posible"
}
ListElement {
seedWord: "win"
}
ListElement {
seedWord: "wine"
}
ListElement {
seedWord: "wing"
}
}
property string insertedWord: ""
onDoneInsertingWord: insertedWord = word
}
}
@@ -91,7 +106,7 @@ Column {
errorMessage: "Error message"
input.clearable: true
input.valid: false
input.placeholderText: "Placeholder"
placeholderText: "Placeholder"
}
StatusInput {
@@ -106,15 +121,16 @@ Column {
StatusInput {
label: "Label"
secondaryLabel: "secondary label"
input.placeholderText: "Placeholder"
input.implicitHeight: 56
placeholderText: "Placeholder"
minimumHeight: 56
maximumHeight: 56
}
StatusInput {
id: input
label: "Label"
charLimit: 30
input.placeholderText: "Input with validator"
placeholderText: "Input with validator"
validators: [
StatusMinLengthValidator {
@@ -132,7 +148,7 @@ Column {
StatusInput {
label: "Input with <i>StatusRegularExpressionValidator</i>"
charLimit: 30
input.placeholderText: `Must match regex(${validators[0].regularExpression.toString()}) and <= 30 chars`
placeholderText: `Must match regex(${validators[0].regularExpression.toString()}) and <= 30 chars`
validationMode: StatusInput.ValidationMode.IgnoreInvalidInput
validators: [
@@ -145,7 +161,7 @@ Column {
StatusInput {
label: "Label"
input.placeholderText: "Input width component (right side)"
placeholderText: "Input width component (right side)"
input.rightComponent: StatusIcon {
icon: "cancel"
height: 16
@@ -156,26 +172,27 @@ Column {
StatusInput {
input.multiline: true
input.placeholderText: "Multiline"
placeholderText: "Multiline"
}
StatusInput {
input.multiline: true
input.placeholderText: "Multiline with static height"
input.implicitHeight: 100
placeholderText: "Multiline with static height"
minimumHeight: 100
maximumHeight: 100
}
StatusInput {
input.multiline: true
input.placeholderText: "Multiline with max/min"
input.minimumHeight: 80
input.maximumHeight: 200
placeholderText: "Multiline with max/min"
minimumHeight: 80
maximumHeight: 200
}
StatusInput {
property bool toggled: true
label: "Input with emoji icon"
input.placeholderText: "Enter Name"
placeholderText: "Enter Name"
input.icon.emoji: toggled ? "😁" : "🧸"
input.icon.color: "blue"
input.isIconSelectable: true
@@ -187,7 +204,7 @@ Column {
StatusInput {
property bool toggled: true
label: "Input with selectable icon which is not an emoji"
input.placeholderText: "Enter Name"
placeholderText: "Enter Name"
input.icon.emoji: ""
input.icon.name: toggled ? "filled-account" : "image"
input.icon.color: "blue"
+44
View File
@@ -0,0 +1,44 @@
import QtQuick 2.0
import QtQuick.Layouts 1.14
import StatusQ.Components 0.1
import StatusQ.Controls 0.1
import StatusQ.Core.Utils 0.1
ColumnLayout {
spacing: 20
StatusItemSelector {
id: selector
icon: "qrc:/images/SNT.png"
iconSize: 24
title: "Item Selector Title"
defaultItemText: "Example: Empty items"
andOperatorText: "and"
orOperatorText: "or"
popupItem: StatusDropdown {
id: dropdown
width: 200
contentItem: ColumnLayout {
spacing: 10
StatusInput {
id: input
Layout.fillWidth: true
}
StatusButton {
Layout.alignment: Qt.AlignHCenter
text: "Add element"
onClicked: {
selector.addItem(input.text, "qrc:/images/SNT.png", selector.itemsModel.count > 0 ? Utils.Operators.Or : Utils.Operators.None)
dropdown.close()
}
}
}
}
}
StatusButton {
Layout.alignment: Qt.AlignHCenter
text: "Clear list"
onClicked: { selector.itemsModel.clear() }
}
}
+2 -1
View File
@@ -34,6 +34,7 @@ GridLayout {
inputList: Models.languageNoImagePickerModel
placeholderSearchText: qsTr("Search Languages")
menuAlignment: StatusListPicker.MenuAlignment.Center
multiSelection: true
}
StatusListPicker {
@@ -60,7 +61,7 @@ GridLayout {
width: 500
text: "4 different configurations for the `StatusListPicker` component:\n
* Single selection. \n
* Single selection but dynamically changed to multiple selection (model provides multiple selected items).\n
* Multiple selection without images.\n
* Multiple selection.\n
* Multiple selection and displayed name is the symbol + shortName\n"
color: Theme.palette.baseColor1
+51 -14
View File
@@ -22,12 +22,17 @@ GridLayout {
onClicked: complexMenu.popup()
}
StatusButton {
id: customPopupButton
text: "Menu with custom images and icons"
onClicked: customMenu.popup()
}
StatusButton {
text: "Menu with custom font settings"
onClicked: differentFontMenu.popup()
}
StatusPopupMenu {
id: simpleMenu
@@ -46,7 +51,7 @@ GridLayout {
StatusPopupMenu {
id: complexMenu
subMenuItemIcons: [{ icon: 'info' }]
// subMenuItemIcons: [{ icon: 'info' }]
StatusMenuItem {
text: "One"
@@ -63,10 +68,13 @@ GridLayout {
StatusMenuItem {
text: "Three"
iconSettings.name: "info"
enabled: false
}
StatusPopupMenu {
title: "Four"
iconSettings.name: "info"
StatusMenuItem {
text: "One"
iconSettings.name: "info"
@@ -80,17 +88,24 @@ GridLayout {
StatusPopupMenu {
id: customMenu
width: customPopupButton.width
subMenuItemIcons: [
{ icon: "chat" },
{
source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
},
{
isLetterIdenticon: true,
color: "red"
}
]
// subMenuItemIcons: [
// {
// icon: "chat"
// },
// {
// source: "qrc:/demoapp/data/profile-image-1.jpeg"
// },
// {
// isLetterIdenticon: true,
// color: "red"
// }
// ]
MenuItem {
text: "Default MenuItem, action: " + action
}
StatusMenuItem {
text: "Anywhere"
@@ -99,7 +114,8 @@ GridLayout {
StatusMenuSeparator {}
StatusPopupMenu {
title: "Chat"
title: "Chat"
iconSettings.name: "chat"
StatusMenuItem {
text: "vitalik.eth"
@@ -110,12 +126,13 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
StatusMenuItem {
text: "Pascal"
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
}
}
StatusPopupMenu {
title: "Cryptokitties"
imageSettings.source: "qrc:/demoapp/data/profile-image-1.jpeg"
StatusMenuItem {
text: "welcome"
@@ -139,6 +156,8 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
StatusPopupMenu {
title: "Another community"
iconSettings.isLetterIdenticon: true
iconSettings.color: "red"
StatusMenuItem {
text: "welcome"
@@ -147,4 +166,22 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
}
}
}
StatusPopupMenu {
id: differentFontMenu
StatusMenuItem {
text: "Bold"
fontSettings.bold: true
}
StatusMenuItem {
text: "Italic"
fontSettings.italic: true
}
StatusMenuItem {
text: "16px"
fontSettings.pixelSize: 16
}
}
}
+28 -16
View File
@@ -8,28 +8,39 @@ import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import Sandbox 0.1
Column {
spacing: 8
spacing: 20
ListModel {
id: commmonModel
ListElement {
name: "Pascal"
}
ListElement {
name: "Khushboo"
}
ListElement {
name: "Alexandra"
}
ListElement {
name: "Eric"
}
}
StatusBaseText {
font.pixelSize: 16
color: Theme.palette.dangerColor1
text: "This component should no longer be used.<br />Please, use `StatusComboBox` instead."
textFormat: Text.MarkdownText
}
StatusSelect {
id: select
label: "Some label"
model: ListModel {
ListElement {
name: "Pascal"
}
ListElement {
name: "Khushboo"
}
ListElement {
name: "Alexandra"
}
ListElement {
name: "Eric"
}
}
model: commmonModel
selectMenu.delegate: StatusMenuItemDelegate {
statusPopupMenu: select
action: StatusMenuItem {
iconSettings.name: "filled-account"
text: name
@@ -38,6 +49,7 @@ Column {
}
}
}
selectedItemComponent: Item {
id: selectedItem
anchors.fill: parent
+14 -4
View File
@@ -9,17 +9,21 @@ Item {
property ListModel asortedContacts: ListModel {
ListElement {
publicId: "0x0"
name: "Maria"
name: "emily.eth"
icon: ""
isIdenticon: false
onlineStatus: 3
isReadonly: false
tagIcon: ""
}
ListElement {
publicId: "0x1"
name: "James"
icon: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
name: "vitalikbuterin"
icon: "qrc:/demoapp/data/profile-image-1.jpeg"
isIdenticon: false
onlineStatus: 1
isReadonly: false
tagIcon: ""
}
ListElement {
publicId: "0x2"
@@ -27,13 +31,17 @@ Item {
icon: ""
isIdenticon: false
onlineStatus: 2
isReadonly: false
tagIcon: ""
}
ListElement {
publicId: "0x3"
name: "Tracy"
name: "carmen.eth"
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
isIdenticon: true
onlineStatus: 3
isReadonly: true
tagIcon: "crown"
}
ListElement {
publicId: "0x4"
@@ -41,6 +49,8 @@ Item {
icon: ""
isIdenticon: false
onlineStatus: 3
isReadonly: false
tagIcon: ""
}
}
+61
View File
@@ -0,0 +1,61 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
Column {
id: root
spacing: 8
Component.onCompleted: {
focusedTextArea.forceActiveFocus()
}
StatusTextArea {
id: focusedTextArea
width: parent.width
placeholderText: "Initially focused text area"
KeyNavigation.tab: unfocusedTextArea
}
StatusTextArea {
id: unfocusedTextArea
width: parent.width
placeholderText: "Unfocused text area (hover me to see the color change)"
KeyNavigation.tab: invalidTextArea
}
StatusTextArea {
id: invalidTextArea
width: parent.width
valid: false
placeholderText: "Invalid text area, should display red border"
KeyNavigation.tab: longTextArea
}
StatusScrollView {
padding: 0 // use our own (StatusTextArea) padding
width: parent.width
height: 120
TextArea.flickable: longTextArea
StatusTextArea {
id: longTextArea
text: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer imperdiet lectus quis justo. Sed vel lectus. \
Donec odio tempus molestie, porttitor ut, iaculis quis, sem. Morbi scelerisque luctus velit. Nunc auctor. Nullam at \
arcu a est sollicitudin euismod. Cras elementum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, \
per inceptos hymenaeos. Fusce aliquam vestibulum ipsum. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. \
Nullam sit amet magna in magna gravida vehicula. Cras pede libero, dapibus nec, pretium sit amet, tempor quis. Nullam faucibus \
mi quis velit. Nam sed tellus id magna elementum tincidunt. Duis bibendum, lectus ut viverra rhoncus, dolor nunc faucibus libero, \
eget facilisis enim ipsum id lacus. Maecenas aliquet accumsan leo. Aliquam erat volutpat."
KeyNavigation.tab: focusedTextArea
}
}
StatusTextArea {
enabled: false
placeholderText: "Disabled text area"
}
}
+3
View File
@@ -35,6 +35,9 @@ Item {
onClose: {
console.warn("toast closed: ", modelData.title)
}
onClicked: {
console.warn("toast clicked")
}
}
}
}
+61 -23
View File
@@ -1,22 +1,5 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>pages/StatusAccountSelectorPage.qml</file>
<file>pages/StatusAddressPage.qml</file>
<file>pages/StatusAssetSelectorPage.qml</file>
<file>pages/StatusChatCommandButtonPage.qml</file>
<file>pages/StatusChatInfoToolBarPage.qml</file>
<file>pages/StatusColorSelectorPage.qml</file>
<file>pages/StatusExpandableSettingsItemPage.qml</file>
<file>pages/StatusInputPage.qml</file>
<file>pages/StatusMacNotificationPage.qml</file>
<file>pages/StatusPopupMenuPage.qml</file>
<file>pages/StatusSelectPage.qml</file>
<file>pages/StatusTabBarIconButtonPage.qml</file>
<file>pages/StatusTabSwitchPage.qml</file>
<file>pages/StatusWalletColorButtonPage.qml</file>
<file>pages/StatusWalletColorSelectPage.qml</file>
<file>pages/StatusPasswordStrengthIndicatorPage.qml</file>
<file>controls/Buttons.qml</file>
<file>controls/Controls.qml</file>
<file>controls/Icons.qml</file>
@@ -24,24 +7,79 @@
<file>controls/ListItems.qml</file>
<file>controls/Others.qml</file>
<file>controls/Popups.qml</file>
<file>demoapp/data/logo-test-image.png</file>
<file>demoapp/data/Models.qml</file>
<file>demoapp/data/qmldir</file>
<file>demoapp/ChatChannelView.qml</file>
<file>demoapp/CreateChatView.qml</file>
<file>demoapp/DemoCommunityDetailModal.qml</file>
<file>demoapp/DemoContactRequestsModal.qml</file>
<file>demoapp/StatusAppChatView.qml</file>
<file>demoapp/StatusAppCommunitiesPortalView.qml</file>
<file>demoapp/StatusAppCommunityView.qml</file>
<file>demoapp/StatusAppProfileSettingsView.qml</file>
<file>demoapp/data/Models.qml</file>
<file>demoapp/data/qmldir</file>
<file>demoapp/data/logo-test-image.png</file>
<file>DemoApp.qml</file>
<file>ThemeSwitch.qml</file>
<file>images/Coinbase.png</file>
<file>images/CoinBaseCommunityBanner.png</file>
<file>images/CommunityBanner1.png</file>
<file>images/CryptoKitties.png</file>
<file>images/CryptoPunks.png</file>
<file>images/Dragonerum.png</file>
<file>images/DribbbleCommunityBanner.png</file>
<file>images/Ethereum.png</file>
<file>images/EthereumCommunityBanner.png</file>
<file>images/Fluff.png</file>
<file>images/FriendsBenefits.png</file>
<file>images/logo-test-image.png</file>
<file>images/P2PCrypto.png</file>
<file>images/RARI.png</file>
<file>images/Rarible.png</file>
<file>images/RaribleCommunityBanner.png</file>
<file>images/SNT.png</file>
<file>images/Socks.png</file>
<file>images/Spotify.png</file>
<file>images/SpotifyCommunityBanner.png</file>
<file>images/SR.png</file>
<file>images/SRToken.png</file>
<file>images/StatusPunks.png</file>
<file>images/SuperRareCommunityBanner.png</file>
<file>pages/StatusAccountSelectorPage.qml</file>
<file>pages/StatusAddressPage.qml</file>
<file>pages/StatusCardPage.qml</file>
<file>pages/StatusChatCommandButtonPage.qml</file>
<file>pages/StatusChatInfoToolBarPage.qml</file>
<file>pages/StatusColorSelectorGridPage.qml</file>
<file>pages/StatusColorSelectorPage.qml</file>
<file>pages/StatusColorSpacePage.qml</file>
<file>pages/StatusCommunityCardPage.qml</file>
<file>pages/StatusCommunityTagsPage.qml</file>
<file>pages/StatusDialogPage.qml</file>
<file>pages/StatusExpandableSettingsItemPage.qml</file>
<file>pages/StatusImageCropPanelPage.qml</file>
<file>pages/StatusInputPage.qml</file>
<file>pages/StatusItemSelectorPage.qml</file>
<file>pages/StatusListPickerPage.qml</file>
<file>pages/StatusMacNotificationPage.qml</file>
<file>pages/StatusPasswordStrengthIndicatorPage.qml</file>
<file>pages/StatusPinInputPage.qml</file>
<file>pages/StatusPopupMenuPage.qml</file>
<file>pages/StatusSelectPage.qml</file>
<file>pages/StatusTabBarButtonPage.qml</file>
<file>pages/StatusTabBarIconButtonPage.qml</file>
<file>pages/StatusTabSwitchPage.qml</file>
<file>pages/StatusTagSelectorPage.qml</file>
<file>pages/StatusToastMessagePage.qml</file>
<file>pages/StatusWalletColorButtonPage.qml</file>
<file>pages/StatusWalletColorSelectPage.qml</file>
<file>pages/StatusWizardStepperPage.qml</file>
<file>pages/StatusTabBarButtonPage.qml</file>
<file>DemoApp.qml</file>
<file>main.qml</file>
<file>ThemeSwitch.qml</file>
<file>examples/FilteringSorting.qml</file>
<file>images/RARI.png</file>
<file>images/SRToken.png</file>
<file>demoapp/data/profile-image-1.jpeg</file>
<file>demoapp/data/profile-image-2.jpeg</file>
<file>pages/StatusItemSelectorPage.qml</file>
<file>pages/StatusComboBoxPage.qml</file>
</qresource>
</RCC>
-96
View File
@@ -1,96 +0,0 @@
QT += quick svg
CONFIG += c++11 warn_on qtquickcompiler
QML_IMPORT_PATH= $$PWD/../src
DEFINES += QT_DEPRECATED_WARNINGS
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
handler.cpp \
main.cpp \
sandboxapp.cpp \
spellchecker.cpp \
!macx {
SOURCES += statuswindow.cpp
}
TARGET = sandboxapp
DESTDIR = $$PWD/bin
DESTDIR = $$PWD/bin
macx {
CONFIG -= app_bundle
OBJECTIVE_SOURCES += \
statuswindow_mac.mm
hunspellTarget.depends = FORCE
hunspellTarget.commands = brew install hunspell
QMAKE_EXTRA_TARGETS += hunspellTarget
exists (/usr/local/lib/libhunspell-1.7.a) {
LIBS += -L"/usr/local/lib" -lhunspell-1.7
INCLUDEPATH += /usr/local/include/hunspell
DEFINES += USE_HUNSPELL
message("hunspell exists in /usr/local/lib")
}
copydata.commands = $(COPY_DIR) $$PWD/dictionaries $$DESTDIR
first.depends = $(first) copydata
export(first.depends)
export(copydata.commands)
QMAKE_EXTRA_TARGETS += first copydata
}
ios {
LIBS += -framework UIKit
QMAKE_TARGET_BUNDLE_PREFIX = "im.status"
#QMAKE_XCODE_CODE_SIGN_IDENTITY = "iPhone Developer"
MY_DEVELOPMENT_TEAM.name = "STATUS HOLDINGS PTE.LTD"
MY_DEVELOPMENT_TEAM.value = "DTX7Z4U3YA"
QMAKE_MAC_XCODE_SETTINGS += MY_DEVELOPMENT_TEAM
}
RESOURCES += qml.qrc \
$$PWD/../statusq.qrc
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
#OTHER_FILES += $$files($$PWD/../src/*, true)
HEADERS += \
handler.h \
sandboxapp.h \
statuswindow.h \
spellchecker.h
OTHER_FILES += $$files($$PWD/../*.qml, true)
OTHER_FILES += $$files($$PWD/*.qml, true)
android {
DISTFILES += \
android/AndroidManifest.xml \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew \
android/gradlew.bat \
android/res/values/libs.xml
contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
ANDROID_PACKAGE_SOURCE_DIR = \
$$PWD/android
}
}
+20 -10
View File
@@ -3,15 +3,20 @@
#include <QQmlContext>
#include <QWindow>
#include <QDebug>
#include <QDirIterator>
#include "statuswindow.h"
#include "spellchecker.h"
SandboxApp::SandboxApp(int &argc, char **argv)
: QGuiApplication(argc, argv),
m_handler(new Handler(this))
: QGuiApplication(argc, argv)
{
connect(m_handler, &Handler::restartQml, this, &SandboxApp::restartEngine, Qt::QueuedConnection);
#ifdef QT_DEBUG
connect(&m_watcher, &QFileSystemWatcher::directoryChanged, [this](const QString&) {
restartEngine();
});
#endif
}
void SandboxApp::startEngine()
@@ -20,18 +25,23 @@ void SandboxApp::startEngine()
qmlRegisterType<SpellChecker>("Sandbox", 0, 1, "Spellchecker");
#ifdef QT_DEBUG
const QUrl url = QUrl::fromLocalFile(applicationDirPath() + "/../main.qml");
const QUrl url = QUrl::fromLocalFile(SRC_DIR + QStringLiteral("/main.qml"));
m_watcher.addPath(applicationDirPath() + "/../");
QDirIterator it(applicationDirPath() + "/../", QDir::Dirs | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
while (it.hasNext()) {
if (!it.filePath().isEmpty()) {
m_watcher.addPath(it.filePath());
}
it.next();
}
#else
const QUrl url(QStringLiteral("qrc:/main.qml"));
#endif
m_engine.rootContext()->setContextProperty("app", m_handler);
#ifdef QT_DEBUG
m_engine.addImportPath(applicationDirPath() + "/../../src");
m_engine.addImportPath(SRC_DIR + QStringLiteral("/../src"));
#else
m_engine.addImportPath(QStringLiteral("qrc:/src"));
m_engine.addImportPath(QStringLiteral(":/"));
#endif
qDebug() << m_engine.importPathList();
QObject::connect(&m_engine, &QQmlApplicationEngine::objectCreated,
@@ -44,7 +54,7 @@ void SandboxApp::startEngine()
void SandboxApp::restartEngine()
{
const QUrl url(applicationDirPath() + "/../main.qml");
const QUrl url = QUrl::fromLocalFile(SRC_DIR + QStringLiteral("/main.qml"));
QWindow *rootWindow = qobject_cast<QWindow*>(m_engine.rootObjects().at(0));
if (rootWindow) {
rootWindow->close();
+7 -2
View File
@@ -4,7 +4,9 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "handler.h"
#ifdef QT_DEBUG
#include <QFileSystemWatcher>
#endif
class SandboxApp : public QGuiApplication
{
@@ -18,7 +20,10 @@ public slots:
private:
QQmlApplicationEngine m_engine;
Handler *m_handler;
#ifdef QT_DEBUG
QFileSystemWatcher m_watcher;
#endif
};
#endif // SANDBOXAPP_H
+2 -8
View File
@@ -1,10 +1,4 @@
#!/bin/bash
make clean
if [[ $OSTYPE == 'darwin'* ]]
then
qmake sandbox.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 && /usr/bin/make qmake_all
else
qmake sandbox.pro CONFIG+=debug CONFIG+=x86_64 && /usr/bin/make qmake_all
fi
make
cmake -B build
cmake --build build
+3 -3
View File
@@ -9,7 +9,7 @@
#include <QLocale>
#include <QRegularExpression>
#include <QApplication>
#include <QGuiApplication>
#include <QDir>
SpellChecker::SpellChecker(QObject *parent)
@@ -53,8 +53,8 @@ void SpellChecker::initHunspell()
delete m_hunspell;
}
QString dictFile = QApplication::applicationDirPath() + "/dictionaries/" + m_lang + "/index.dic";
QString affixFile = QApplication::applicationDirPath() + "/dictionaries/" + m_lang + "/index.aff";
QString dictFile = QGuiApplication::applicationDirPath() + "/dictionaries/" + m_lang + "/index.dic";
QString affixFile = QGuiApplication::applicationDirPath() + "/dictionaries/" + m_lang + "/index.aff";
QByteArray dictFilePathBA = dictFile.toLocal8Bit();
QByteArray affixFilePathBA = affixFile.toLocal8Bit();
m_hunspell = new Hunspell(affixFilePathBA.constData(),
+46 -2
View File
@@ -1,5 +1,33 @@
#include "statuswindow.h"
StatusWindow::StatusWindow(QQuickWindow *parent)
: QQuickWindow(parent)
, m_isFullScreen(false)
{
removeTitleBar();
connect(this, &QQuickWindow::windowStateChanged, [&](Qt::WindowState windowState) {
if (windowState == Qt::WindowNoState) {
removeTitleBar();
m_isFullScreen = false;
emit isFullScreenChanged();
} else if (windowState == Qt::WindowFullScreen) {
m_isFullScreen = true;
emit isFullScreenChanged();
showTitleBar();
}
});
}
void StatusWindow::updatePosition()
{
auto point = QPoint(screen()->geometry().center().x() - geometry().width() / 2,
screen()->geometry().center().y() - geometry().height() / 2);
if (point != this->position()) {
this->setPosition(point);
}
}
void StatusWindow::toggleFullScreen()
{
if (m_isFullScreen) {
@@ -16,10 +44,26 @@ bool StatusWindow::isFullScreen() const
void StatusWindow::removeTitleBar()
{
#ifdef Q_OS_WIN
removeTitleBarWin();
#elif defined Q_OS_MACOS
removeTitleBarMac();
#endif
}
void StatusWindow::showTitleBar()
{
#ifdef Q_OS_WIN
showTitleBarWin();
#elif defined Q_OS_MACOS
showTitleBarMac();
#endif
}
#ifdef Q_OS_WIN
void StatusWindow::removeTitleBarWin()
{}
void StatusWindow::showTitleBarWin()
{}
#endif
+9 -33
View File
@@ -11,40 +11,11 @@ class StatusWindow: public QQuickWindow
Q_PROPERTY(bool isFullScreen READ isFullScreen NOTIFY isFullScreenChanged)
public:
struct EventCallbacks {
std::function<void()> onResize;
std::function<void()> willExitFullScreen;
std::function<void()> didExitFullScreen;
};
explicit StatusWindow(QWindow *parent = nullptr)
: QQuickWindow(parent),
m_isFullScreen(false)
{
removeTitleBar();
connect(this, &QQuickWindow::windowStateChanged, [&](Qt::WindowState windowState) {
if (windowState == Qt::WindowNoState) {
removeTitleBar();
m_isFullScreen = false;
emit isFullScreenChanged();
} else if (windowState == Qt::WindowFullScreen) {
m_isFullScreen = true;
emit isFullScreenChanged();
showTitleBar();
}
});
}
explicit StatusWindow(QQuickWindow *parent = nullptr);
Q_INVOKABLE void toggleFullScreen();
Q_INVOKABLE void updatePosition() {
auto point = QPoint(screen()->geometry().center().x() - geometry().width() / 2, screen()->geometry().center().y() - geometry().height() / 2);
if (point != this->position()) {
this->setPosition(point);
}
}
Q_INVOKABLE void updatePosition();
bool isFullScreen() const;
@@ -54,10 +25,15 @@ signals:
private:
void removeTitleBar();
void showTitleBar();
void initCallbacks();
#ifdef Q_OS_WIN
void removeTitleBarWin();
void showTitleBarWin();
#elif defined Q_OS_MACOS
void removeTitleBarMac();
void showTitleBarMac();
#endif
private:
EventCallbacks m_callbacks;
bool m_isFullScreen;
};
+2 -16
View File
@@ -12,21 +12,7 @@
#include <AppKit/NSButton.h>
#include <AppKit/AppKit.h>
void StatusWindow::toggleFullScreen()
{
if (m_isFullScreen) {
showNormal();
} else {
showFullScreen();
}
}
bool StatusWindow::isFullScreen() const
{
return m_isFullScreen;
}
void StatusWindow::removeTitleBar()
void StatusWindow::removeTitleBarMac()
{
NSView *nsView = reinterpret_cast<NSView*>(this->winId());
NSWindow *window = [nsView window];
@@ -39,7 +25,7 @@ void StatusWindow::removeTitleBar()
[titleBarContainerView setHidden:YES];
}
void StatusWindow::showTitleBar()
void StatusWindow::showTitleBarMac()
{
NSView *nsView = reinterpret_cast<NSView*>(this->winId());
NSWindow *window = [nsView window];
@@ -0,0 +1,30 @@
import QtQuick 2.14
import QtGraphicalEffects 1.14
Item {
id: root
property Item mask
property color color: "#F6F8FA"
Rectangle {
id: gradient
anchors.fill: parent
visible: false
gradient: Gradient {
orientation: Gradient.Horizontal
SkeletonGradientStop { color: "transparent"; from: -3; }
SkeletonGradientStop { color: "transparent"; from: -2; }
SkeletonGradientStop { color: root.color; from: -1 ; }
SkeletonGradientStop { color: "transparent"; from: 0; }
SkeletonGradientStop { color: "transparent"; from: 1; }
}
}
OpacityMask {
anchors.fill: parent
source: gradient
maskSource: root.mask
}
}
@@ -0,0 +1,24 @@
import QtQuick 2.14
import QtGraphicalEffects 1.14
/*
TODO: This component should be implemented as inline component of `SkeletonAnimation.qml`
when we use Qt > 5.15
*/
GradientStop {
id: root
property real from: 0
color: "transparent"
NumberAnimation on position {
easing.type: Easing.Linear
loops: Animation.Infinite
running: visible
from: root.from
to: from + 4
duration: 2000
}
}
+4
View File
@@ -0,0 +1,4 @@
module StatusQ.Animations
SkeletonAnimation 0.1 SkeletonAnimation.qml
SkeletonGradientStop 0.1 SkeletonGradientStop.qml
+3 -3
View File
@@ -4,6 +4,7 @@ import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
/// Forces size, hard to reuse it
StatusBaseText {
id: root
@@ -18,7 +19,6 @@ StatusBaseText {
color: Theme.palette.baseColor1
Component.onCompleted: {
maxWidth = width
expanded = actualWidth <= maxWidth
}
@@ -29,9 +29,9 @@ StatusBaseText {
onClicked: {
if (root.expanded) {
width = root.width = root.maxWidth
root.width = root.maxWidth
} else {
width = root.width = root.actualWidth
root.width = root.actualWidth
}
root.expanded = !root.expanded
}
@@ -0,0 +1,189 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
/*!
\qmltype StatusAddressPanel
\inherits Item
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief Show an address as defined efined in design https://www.figma.com/file/FkFClTCYKf83RJWoifWgoX/Wallet-v2?node-id=4222%3A178403 and https://www.figma.com/file/h2Ab3k4wy1Y7SFHEvbcZZx/%E2%9A%99%EF%B8%8F-Settings-%7C-Desktop-(Copy)?node-id=1009%3A106451
Panel's components:
- Address: displays the rquired \c address property
- Frame: a rounded frame and the \c 0x icon prefix
- Copy action: clickable copy icon. Activable using \c showCopy
\qmlproperty string address address to show
\qmlproperty bool showCopy if \c true shows the copy action which triggers \c doCopy signal
\qmlproperty bool autHideCopyIcon if \c true shows the copy action when hovered. \see showCopy
\qmlproperty alias showFrame if \c true displays frame and \c 0x prefix
\qmlproperty bool expandable if \c true user can toggle between expanded and compact version; \see expanded
\qmlproperty bool expanded if \c true show address in full; if \c false show the address in compact mode eliding in the middle
\qmlproperty font: statusAddress.font
signal doCopy(string address)
\see StatusImageCrop for more details
Usage example:
\qml
StatusAddressPanel {
address: currentAccount.mixedcaseAddress
autHideCopyIcon: true
expanded: false
onDoCopy: (address) => root.store.copyToClipboard(address)
}
\endqml
For a list of components available see StatusQ.
*/
Item {
id: root
/*required*/ property string address: ""
property bool showCopy: true
property bool autHideCopyIcon: false
property alias showFrame: frameRect.visible
property bool expandable: false
property bool expanded: true
property alias font: statusAddress.font
signal doCopy(string address)
implicitWidth: frameLayout.implicitWidth
implicitHeight: frameLayout.implicitHeight
RowLayout {
id: frameLayout
anchors.fill: parent
RowLayout {
Layout.leftMargin: frameRect.visible ? 8 : undefined // Theme.geometry.halfPadding
Layout.rightMargin: Layout.leftMargin
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Layout.minimumWidth: 120
Layout.preferredHeight: 32
spacing: 6
StatusIcon {
icon: "address"
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: 19
Layout.preferredHeight: 19
visible: frameRect.visible
color: Theme.palette.baseColor1
opacity: 0.5
}
// Ensure the eliding is done in the middle of the value not taking into account `0x`
RowLayout {
spacing: 0
Layout.alignment: Qt.AlignVCenter
StatusBaseText {
text: "0x"
Layout.alignment: Qt.AlignVCenter
font: statusAddress.font
color: statusAddress.color
}
StatusBaseText {
id: statusAddress
text: root.address.replace("0x", "").replace("0X", "")
Layout.preferredWidth: expanded ? implicitWidth : (implicitWidth * 0.25).toFixed()
Layout.alignment: Qt.AlignVCenter
font.family: Theme.palette.monoFont.name
font.pixelSize: 15
font.weight: Font.Medium
elide: Text.ElideMiddle
color: Theme.palette.baseColor1
}
}
StatusIcon {
icon: "copy"
visible: root.autHideCopyIcon ? (mainMouseArea.containsMouse || copyMouseArea.containsMouse )
: root.showCopy
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: (statusAddress.font.pixelSize * 1.2).toFixed()
Layout.preferredHeight: Layout.preferredWidth
color: Theme.palette.baseColor1
MouseArea {
id: copyMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.ArrowCursor
preventStealing: true
onClicked: root.doCopy(root.address)
z: frameRect.z + 1
}
StatusIcon {
icon: parent.icon
x: 1
y: 1
width: parent.width
height: parent.height
visible: copyMouseArea.containsMouse && !copyMouseArea.pressed
color: "black"
opacity: 0.4
z: parent.z + 1
}
}
}
}
Rectangle {
id: frameRect
anchors.fill: frameLayout
color: "transparent"
border.width: 1
border.color: Theme.palette.baseColor2
radius: 36
}
MouseArea {
id: mainMouseArea
anchors.fill: parent
hoverEnabled: root.expandable || root.autHideCopyIcon
enabled: (root.autHideCopyIcon && root.showCopy) || root.expandable
acceptedButtons: root.expandable ? Qt.LeftButton : Qt.NoButton
cursorShape: root.expandable ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: root.expanded = !root.expanded
z: frameLayout.z - 1
}
}
+2
View File
@@ -30,6 +30,8 @@ Rectangle {
font.weight: Font.Medium
color: Theme.palette.statusBadge.foregroundColor
anchors.centerIn: parent
anchors.verticalCenterOffset: statusBadge.border.width/4
anchors.horizontalCenterOffset: statusBadge.border.width/4
text: {
if (statusBadge.value > 99) {
return qsTr("99+");
+498
View File
@@ -0,0 +1,498 @@
import QtQuick 2.13
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
/*!
\qmltype StatusCard
\inherits Rectangle
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief This component represents a StatusCard as defined in design under https://www.figma.com/file/FkFClTCYKf83RJWoifWgoX/Wallet-v2?node-id=3161%3A171040
There is an advanced mode available where a StatusInput is provided for the user to be able to change values.
Example of how the component looks like:
\image status_card.png
Example of how to use it:
\qml
StatusCard {
id: card
primaryText: "Mainnet"
secondaryText: "75"
tertiaryText: "BALANCE: " + 250
cardIconName: "status"
advancedMode: false
}
\endqml
For a list of components available see StatusQ.
*/
Rectangle {
id: root
/*!
\qmlproperty string StatusCard::disabledText
This property is the text to be shown when the card is disabled
*/
property string disabledText: ""
/*!
\qmlproperty bool StatusCard::disabled
This property holds if the card is disbaled
*/
property bool disabled: false
/*!
\qmlproperty bool StatusCard::clickable
This property holds if the card is clickable
*/
property bool clickable: true
/*!
\qmlproperty bool StatusCard::advancedMode
This property holds if advanced mode is on for the StatusCard component
*/
property bool advancedMode: false
/*!
\qmlproperty int StatusCard::lockTimeout
This property enables user to customise the amount of time given to the user to enter a new value in
advanced mode before it locked for any new changes
*/
property int lockTimeout: 1500
/*!
\qmlproperty alias StatusCard::primaryText
Used to set Primary text in the StatusCard
*/
property alias primaryText: primaryText.text
/*!
\qmlproperty string StatusCard::secondaryText
Used to set Secondary text in the StatusCard
*/
property string secondaryText: ""
/*!
\qmlproperty alias StatusCard::tertiaryText
Used to set Tertiary text in the StatusCard
*/
property alias tertiaryText: tertiaryText.text
/*!
\qmlproperty alias StatusCard::advancedInputText
Used to set text in the StatusInput in advancedMode
*/
property alias advancedInputText: advancedInput.text
/*!
\qmlproperty alias StatusCard::errorIconName
Used to assign an icon to the error icon in StatusCard
*/
property alias errorIconName: errorIcon.icon
/*!
\qmlproperty alias StatusCard::cardIconName
Used to assign an icon to the card icon in StatusCard
*/
property alias cardIconName: cardIcon.icon
/*!
\qmlproperty alias StatusCard::primaryLabel
This property allows user to customize the primary label in the StatusCard
*/
property alias primaryLabel: primaryText
/*!
\qmlproperty alias StatusCard::secondaryLabel
This property allows user to customize the secondary label in the StatusCard
*/
property alias secondaryLabel: secondaryLabel
/*!
\qmlproperty alias StatusCard::tertiaryLabel
This property allows user to customize the tertiary label in the StatusCard
*/
property alias tertiaryLabel: tertiaryText
/*!
\qmlproperty alias StatusCard::advancedInput
This property allows user to customize the StatusInput in advanced mode
*/
property alias advancedInput: advancedInput
/*!
\qmlproperty alias StatusCard::errorIcon
This property allows user to customize the error icon in the StatusCard
*/
property alias errorIcon: errorIcon
/*!
\qmlproperty alias StatusCard::cardIcon
This property allows user to customize the card icon in the StatusCard
*/
property alias cardIcon: cardIcon
/*!
\qmlsignal StatusCard::clicked
This signal is emitted when the card is clicked
*/
signal clicked()
/*!
\qmlproperty string StatusCard::state
This property holds the states of the StatusCard.
Possible values are:
\ "default" : Normal state
\ "unavailable" : Unavailable state
\ "unpreferred": Not preffered state
\ "error" : Error state
*/
state: "default"
implicitHeight: advancedInput.visible ? 90 : 76
implicitWidth: 128
radius: 8
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton
enabled: root.clickable && root.state !== "unavailable"
onClicked: {
disabled = !disabled
root.clicked()
}
}
RowLayout {
id: layout
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.leftMargin: 8
anchors.rightMargin: 8
anchors.topMargin: 8
ColumnLayout {
Layout.maximumWidth: root.width - cardIcon.width - 24
StatusBaseText {
id: primaryText
Layout.maximumWidth: parent.width
font.pixelSize: 15
font.weight: Font.Medium
elide: Text.ElideRight
}
RowLayout {
id: basicInput
StatusBaseText {
id: secondaryLabel
font.pixelSize: 13
font.weight: Font.Medium
}
StatusIcon {
id: errorIcon
width: 14
height: 14
Layout.alignment: Qt.AlignTop
icon: "tiny/warning"
color: Theme.palette.pinColor1
}
}
StatusInput {
id: advancedInput
property bool locked: false
implicitWidth: 80
maximumHeight: 32
topPadding: 0
bottomPadding: 0
leftPadding: 8
rightPadding: 5
input.edit.font.pixelSize: 13
input.edit.readOnly: locked || disabled
input.rightComponent: Row {
width: implicitWidth
spacing: 4
StatusFlatRoundButton {
anchors.verticalCenter: parent.verticalCenter
width: 12
height: 12
icon.name: advancedInput.locked ? "lock" : "unlock"
icon.width: 12
icon.height: 12
icon.color: advancedInput.locked ? Theme.palette.primaryColor1 : Theme.palette.baseColor1
type: StatusFlatRoundButton.Type.Secondary
enabled: !disabled
onClicked: {
advancedInput.locked = !advancedInput.locked
waitTimer.restart()
}
}
StatusFlatRoundButton {
width: 14
height: 14
icon.name: "clear"
icon.width: 14
icon.height: 14
icon.color: Theme.palette.baseColor1
type: StatusFlatRoundButton.Type.Secondary
onClicked: advancedInput.edit.clear()
}
}
onTextChanged: {
locked = false
waitTimer.restart()
}
Timer {
id: waitTimer
interval: lockTimeout
onTriggered: {
if(advancedInput.edit.text)
advancedInput.locked = true
}
}
}
StatusBaseText {
id: tertiaryText
font.pixelSize: 10
}
}
StatusIcon {
id: cardIcon
Layout.alignment: Qt.AlignTop | Qt.AlignRight
Layout.preferredHeight: 32
Layout.preferredWidth: 32
mipmap: true
}
}
states: [
State {
name: "default"
PropertyChanges {
target: root
color: disabled ? Theme.palette.baseColor4 : "transparent"
}
PropertyChanges {
target: root
border.color: disabled ? "transparent" : Theme.palette.primaryColor2
}
PropertyChanges {
target: primaryText
color: Theme.palette.directColor1
}
PropertyChanges {
target: primaryText
visible: primaryText.text
}
PropertyChanges {
target: secondaryLabel
color: disabled ? Theme.palette.directColor5: Theme.palette.primaryColor1
}
PropertyChanges {
target: secondaryLabel
visible: !advancedMode && secondaryLabel.text
}
PropertyChanges {
target: secondaryLabel
text: disabled ? disabledText : secondaryText
}
PropertyChanges {
target: tertiaryText
color: Theme.palette.directColor5
}
PropertyChanges {
target: tertiaryText
visible: tertiaryText.text
}
PropertyChanges {
target: cardIcon
opacity: disabled ? 0.4 : 1
}
PropertyChanges {
target: errorIcon
visible: false
}
PropertyChanges {
target: advancedInput
visible: advancedMode
}
PropertyChanges {
target: advancedInput
edit.color: Theme.palette.directColor1
}
PropertyChanges {
target: basicInput
visible: !advancedMode
}
},
State {
name: "error"
PropertyChanges {
target: root
color: disabled ? Theme.palette.baseColor4 : "transparent"
}
PropertyChanges {
target: root
border.color: disabled ? "transparent" : Theme.palette.primaryColor2
}
PropertyChanges {
target: primaryText
color: Theme.palette.directColor1
}
PropertyChanges {
target: primaryText
visible: primaryText.text
}
PropertyChanges {
target: secondaryLabel
color: disabled ? Theme.palette.directColor5: Theme.palette.dangerColor1
}
PropertyChanges {
target: secondaryLabel
visible: !advancedMode && secondaryLabel.text
}
PropertyChanges {
target: secondaryLabel
text: disabled ? disabledText : secondaryText
}
PropertyChanges {
target: tertiaryText
color: disabled ? Theme.palette.directColor5 : Theme.palette.dangerColor1
}
PropertyChanges {
target: tertiaryText
visible: tertiaryText.text
}
PropertyChanges {
target: cardIcon
opacity: disabled ? 0.4 : 1
}
PropertyChanges {
target: errorIcon
visible: false
}
PropertyChanges {
target: advancedInput
visible: advancedMode
}
PropertyChanges {
target: advancedInput
edit.color: disabled ? Theme.palette.directColor5 : Theme.palette.dangerColor1
}
PropertyChanges {
target: basicInput
visible: !advancedMode
}
},
State {
name: "unpreferred"
PropertyChanges {
target: root
color: disabled ? Theme.palette.baseColor4 : "transparent"
}
PropertyChanges {
target: root
border.color: disabled ? "transparent": Theme.palette.pinColor2
}
PropertyChanges {
target: primaryText
color: Theme.palette.directColor1
}
PropertyChanges {
target: primaryText
visible: primaryText.text
}
PropertyChanges {
target: secondaryLabel
color: disabled ? Theme.palette.directColor5 : Theme.palette.pinColor1
}
PropertyChanges {
target: secondaryLabel
visible: !advancedMode && secondaryLabel.text
}
PropertyChanges {
target: secondaryLabel
text: disabled ? disabledText : secondaryText
}
PropertyChanges {
target: tertiaryText
color: disabled ? Theme.palette.directColor5 : Theme.palette.pinColor1
}
PropertyChanges {
target: tertiaryText
visible: tertiaryText.text
}
PropertyChanges {
target: cardIcon
opacity: disabled ? 0.4 : 1
}
PropertyChanges {
target: errorIcon
visible: !disabled && !advancedMode
}
PropertyChanges {
target: advancedInput
visible: advancedMode
}
PropertyChanges {
target: advancedInput
edit.color: Theme.palette.directColor1
}
PropertyChanges {
target: basicInput
visible: !advancedMode
}
},
State {
name: "unavailable"
PropertyChanges {
target: root
color: "transparent"
}
PropertyChanges {
target: root
border.color: "transparent"
}
PropertyChanges {
target: primaryText
color: Theme.palette.directColor5
}
PropertyChanges {
target: primaryText
visible: primaryText.text
}
PropertyChanges {
target: secondaryLabel
color: Theme.palette.directColor5
}
PropertyChanges {
target: secondaryLabel
visible: secondaryLabel.text
}
PropertyChanges {
target: secondaryLabel
text: secondaryText
}
PropertyChanges {
target: tertiaryText
color: Theme.palette.directColor5
}
PropertyChanges {
target: tertiaryText
visible: tertiaryText.text
}
PropertyChanges {
target: cardIcon
opacity: 0.4
}
PropertyChanges {
target: errorIcon
visible: false
}
PropertyChanges {
target: advancedInput
visible: false
}
PropertyChanges {
target: advancedInput
edit.color: Theme.palette.directColor1
}
PropertyChanges {
target: basicInput
visible: true
}
}
]}
@@ -73,6 +73,7 @@ Item {
duration: 150
direction: RotationAnimation.Clockwise
easing.type: Easing.InCubic
running: visible
}
},
Transition {
@@ -82,6 +83,7 @@ Item {
duration: 150
direction: RotationAnimation.Counterclockwise
easing.type: Easing.OutCubic
running: visible
}
}
]
+53 -23
View File
@@ -9,7 +9,7 @@ import StatusQ.Components 0.1
import StatusQ.Controls 0.1
Column {
id: statusChatList
id: root
spacing: 4
width: 288
@@ -23,8 +23,6 @@ Column {
property Component popupMenu
property var filterFn
signal chatItemSelected(string categoryId, string id)
signal chatItemUnmuted(string id)
signal chatItemReordered(string id, int from, int to)
@@ -35,22 +33,36 @@ Column {
}
}
onDraggableItemsChanged: delegateModel.items.setGroups(0, delegateModel.items.count, "unsorted")
QtObject {
id: d
property int destinationPosition: -1
}
DelegateModel {
id: delegateModel
model: statusChatList.model
model: root.model
items.includeByDefault: !root.draggableItems
groups: DelegateModelGroup {
id: unsortedItems
name: "unsorted"
includeByDefault: root.draggableItems
onChanged: Utils.delegateModelSort(unsortedItems, delegateModel.items,
(a, b) => a.position < b.position)
}
delegate: Item {
id: draggable
width: statusChatListItem.width
objectName: model.name
width: root.width
height: statusChatListItem.height
property alias chatListItem: statusChatListItem
visible: {
if (!!statusChatList.filterFn) {
return statusChatList.filterFn(model)
}
return true
}
MouseArea {
id: dragSensor
@@ -58,7 +70,7 @@ Column {
cursorShape: active ? Qt.ClosedHandCursor : Qt.PointingHandCursor
hoverEnabled: true
pressAndHoldInterval: 150
enabled: statusChatList.draggableItems
enabled: root.draggableItems
property bool active: false
property real startY: 0
@@ -74,8 +86,8 @@ Column {
}
onPressAndHold: active = true
onReleased: {
if (active) {
statusChatList.chatItemReordered(statusChatListItem.chatId, statusChatListItem.originalOrder, statusChatListItem.originalOrder)
if (active && d.destinationPosition !== -1 && statusChatListItem.originalOrder !== d.destinationPosition) {
root.chatItemReordered(statusChatListItem.chatId, statusChatListItem.originalOrder, d.destinationPosition)
}
active = false
}
@@ -89,10 +101,12 @@ Column {
active = true
}
}
onActiveChanged: d.destinationPosition = -1
StatusChatListItem {
id: statusChatListItem
width: parent.width
opacity: dragSensor.active ? 0.0 : 1.0
originalOrder: model.position
chatId: model.itemId
@@ -103,7 +117,7 @@ Column {
hasUnreadMessages: model.hasUnreadMessages
notificationsCount: model.notificationsCount
highlightWhenCreated: !!model.highlight
selected: (model.active && statusChatList.highlightItem)
selected: (model.active && root.highlightItem)
icon.emoji: model.emoji
icon.color: !!model.color ? model.color : Theme.palette.userCustomizationColors[model.colorId]
@@ -112,10 +126,26 @@ Column {
ringSettings.ringSpecModel: model.colorHash
sensor.cursorShape: dragSensor.cursorShape
Connections {
target: statusChatListItem
enabled: root.draggableItems
function onOriginalOrderChanged() {
Qt.callLater(() => {
if (!delegateModel)
return
delegateModel.items.setGroups(0, delegateModel.items.count, "unsorted")
})
}
}
onClicked: {
highlightWhenCreated = false
if (mouse.button === Qt.RightButton && !!statusChatList.popupMenu) {
if (mouse.button === Qt.RightButton && !!root.popupMenu) {
statusChatListItem.highlighted = true
let originalOpenHandler = popupMenuSlot.item.openHandler
@@ -136,17 +166,17 @@ Column {
}
}
let p = statusChatListItem.mapToItem(statusChatList, mouse.x, mouse.y)
let p = statusChatListItem.mapToItem(root, mouse.x, mouse.y)
popupMenuSlot.item.popup(p.x + 4, p.y + 6)
popupMenuSlot.item.openHandler = originalOpenHandler
return
}
if (!statusChatListItem.selected) {
statusChatList.chatItemSelected(model.parentItemId, model.itemId)
root.chatItemSelected(model.parentItemId, model.itemId)
}
}
onUnmute: statusChatList.chatItemUnmuted(model.itemId)
onUnmute: root.chatItemUnmuted(model.itemId)
}
}
@@ -157,7 +187,6 @@ Column {
keys: ["chat-item-category-" + statusChatListItem.categoryId]
onEntered: reorderDelay.start()
onDropped: statusChatList.chatItemReordered(statusChatListItem.chatId, drag.source.originalOrder, statusChatListItem.DelegateModel.itemsIndex)
Timer {
id: reorderDelay
@@ -165,7 +194,7 @@ Column {
repeat: false
onTriggered: {
if (dropArea.containsDrag) {
dropArea.drag.source.chatListItem.originalOrder = statusChatListItem.originalOrder
d.destinationPosition = delegateModel.model.get(draggable.DelegateModel.itemsIndex).position
delegateModel.items.move(dropArea.drag.source.DelegateModel.itemsIndex, draggable.DelegateModel.itemsIndex)
}
}
@@ -209,11 +238,12 @@ Column {
Repeater {
id: statusChatListItems
objectName: "chatListItems"
model: delegateModel
}
Loader {
id: popupMenuSlot
active: !!statusChatList.popupMenu
active: !!root.popupMenu
}
}
@@ -7,12 +7,16 @@ import StatusQ.Components 0.1
import StatusQ.Popups 0.1
import StatusQ.Core 0.1
import SortFilterProxyModel 0.2
Item {
id: statusChatListAndCategories
id: root
implicitHeight: chatListsAndCategories.height
implicitWidth: chatListsAndCategories.width
property alias highlightItem: statusChatList.highlightItem
property StatusTooltipSettings categoryAddButtonToolTip: StatusTooltipSettings {
text: qsTr("Add channel inside category")
}
@@ -49,11 +53,11 @@ Item {
MouseArea {
id: sensor
anchors.top: parent.top
width: statusChatListAndCategories.width
height: statusChatListAndCategories.height
width: root.width
height: root.height
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: {
if (mouse.button === Qt.RightButton && showPopupMenu && !!statusChatListAndCategories.popupMenu) {
if (mouse.button === Qt.RightButton && showPopupMenu && !!root.popupMenu) {
popupMenuSlot.item.popup(mouse.x + 4, mouse.y + 6)
return
}
@@ -69,20 +73,44 @@ Item {
StatusChatList {
id: statusChatList
visible: statusChatList.model.count > 0
onChatItemSelected: statusChatListAndCategories.chatItemSelected(categoryId, id)
onChatItemUnmuted: statusChatListAndCategories.chatItemUnmuted(id)
onChatItemReordered: statusChatListAndCategories.chatItemReordered(categoryId, id, from, to)
draggableItems: statusChatListAndCategories.draggableItems
model: statusChatListAndCategories.model
filterFn: function (model) {
return !model.isCategory
onChatItemSelected: root.chatItemSelected(categoryId, id)
onChatItemUnmuted: root.chatItemUnmuted(id)
onChatItemReordered: root.chatItemReordered(categoryId, id, from, to)
draggableItems: root.draggableItems
model: SortFilterProxyModel {
sourceModel: root.model
filters: ValueFilter { roleName: "isCategory"; value: false }
sorters: RoleSorter { roleName: "position" }
}
popupMenu: statusChatListAndCategories.chatListPopupMenu
popupMenu: root.chatListPopupMenu
}
DelegateModel {
id: delegateModel
model: statusChatListAndCategories.model
property int destinationPosition: -1
model: SortFilterProxyModel {
sourceModel: root.model
filters: ValueFilter { roleName: "isCategory"; value: true }
sorters: RoleSorter { roleName: "position" }
}
items.includeByDefault: false
groups: DelegateModelGroup {
id: unsortedItems
name: "unsorted"
includeByDefault: true
onChanged: Utils.delegateModelSort(unsortedItems, delegateModel.items,
(a, b) => a.position < b.position)
}
delegate: Item {
id: draggable
width: statusChatListCategory.width
@@ -102,13 +130,13 @@ Item {
dragSensor.drag.threshold: 0.1
dragSensor.drag.filterChildren: true
dragSensor.onPressAndHold: {
if (statusChatListAndCategories.draggableCategories) {
if (root.draggableCategories) {
dragActive = true
}
}
dragSensor.onReleased: {
if (dragActive) {
statusChatListAndCategories.chatListCategoryReordered(statusChatListCategory.categoryId, statusChatListCategory.originalOrder, statusChatListCategory.originalOrder)
if (dragActive && delegateModel.destinationPosition !== -1 && statusChatListCategory.originalOrder !== delegateModel.destinationPosition) {
root.chatListCategoryReordered(statusChatListCategory.categoryId, statusChatListCategory.originalOrder, delegateModel.destinationPosition)
}
dragActive = false
}
@@ -118,38 +146,44 @@ Item {
startX = dragSensor.mouseX
}
dragSensor.onMouseYChanged: {
if (statusChatListAndCategories.draggableCategories && (Math.abs(startY - dragSensor.mouseY) > 1) && dragSensor.pressed) {
if (root.draggableCategories && (Math.abs(startY - dragSensor.mouseY) > 1) && dragSensor.pressed) {
dragActive = true
}
}
dragSensor.onMouseXChanged: {
if (statusChatListAndCategories.draggableCategories && (Math.abs(startX - dragSensor.mouseX) > 1) && dragSensor.pressed) {
if (root.draggableCategories && (Math.abs(startX - dragSensor.mouseX) > 1) && dragSensor.pressed) {
dragActive = true
}
}
onDragActiveChanged: delegateModel.destinationPosition = -1
addButton.tooltip: statusChatListAndCategories.categoryAddButtonToolTip
menuButton.tooltip: statusChatListAndCategories.categoryMenuButtonToolTip
addButton.tooltip: root.categoryAddButtonToolTip
menuButton.tooltip: root.categoryMenuButtonToolTip
originalOrder: model.position
categoryId: model.itemId
name: model.name
showActionButtons: statusChatListAndCategories.showCategoryActionButtons
addButton.onClicked: statusChatListAndCategories.categoryAddButtonClicked(model.itemId)
chatList.model: model.subItems
chatList.onChatItemSelected: statusChatListAndCategories.chatItemSelected(categoryId, id)
chatList.onChatItemUnmuted: statusChatListAndCategories.chatItemUnmuted(id)
chatList.onChatItemReordered: statusChatListAndCategories.chatItemReordered(model.itemId, id, from, to)
chatList.draggableItems: statusChatListAndCategories.draggableItems
showActionButtons: root.showCategoryActionButtons
addButton.onClicked: root.categoryAddButtonClicked(model.itemId)
popupMenu: statusChatListAndCategories.categoryPopupMenu
chatListPopupMenu: statusChatListAndCategories.chatListPopupMenu
chatList.model: SortFilterProxyModel {
sourceModel: model.subItems
sorters: RoleSorter { roleName: "position" }
}
chatList.onChatItemSelected: root.chatItemSelected(categoryId, id)
chatList.onChatItemUnmuted: root.chatItemUnmuted(id)
chatList.onChatItemReordered: root.chatItemReordered(model.itemId, id, from, to)
chatList.draggableItems: root.draggableItems
popupMenu: root.categoryPopupMenu
chatListPopupMenu: root.chatListPopupMenu
// Used to set the initial value of "opened" when the
// model is bound/changed.
opened: {
let openedState = statusChatListAndCategories.openedCategoryState[model.itemId]
let openedState = root.openedCategoryState[model.itemId]
return openedState !== undefined ? openedState : true // defaults to open
}
@@ -158,7 +192,18 @@ Item {
// as the state would be lost each time the model is
// changed.
onOpenedChanged: {
statusChatListAndCategories.openedCategoryState[model.itemId] = statusChatListCategory.opened
root.openedCategoryState[model.itemId] = statusChatListCategory.opened
}
Connections {
function onOriginalOrderChanged() {
Qt.callLater(() => {
if (!delegateModel)
return
delegateModel.items.setGroups(0, delegateModel.items.count, "unsorted")
})
}
}
}
@@ -169,7 +214,6 @@ Item {
keys: ["chat-category"]
onEntered: reorderDelay.start()
onDropped: statusChatListAndCategories.chatListCategoryReordered(statusChatListCategory.categoryId, drag.source.originalOrder, statusChatListCategory.DelegateModel.itemsIndex)
Timer {
id: reorderDelay
@@ -177,7 +221,7 @@ Item {
repeat: false
onTriggered: {
if (dropArea.containsDrag) {
dropArea.drag.source.chatListCategory.originalOrder = statusChatListCategory.originalOrder
delegateModel.destinationPosition = delegateModel.model.get(draggable.DelegateModel.itemsIndex).position
delegateModel.items.move(dropArea.drag.source.DelegateModel.itemsIndex, draggable.DelegateModel.itemsIndex)
}
}
@@ -223,6 +267,6 @@ Item {
Loader {
id: popupMenuSlot
active: !!statusChatListAndCategories.popupMenu
active: !!root.popupMenu
}
}
@@ -35,7 +35,6 @@ Column {
StatusChatListCategoryItem {
id: statusChatListCategoryItem
title: statusChatListCategory.name
visible: model.isCategory
opened: statusChatListCategory.opened
sensor.pressAndHoldInterval: 150
@@ -66,9 +65,6 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter
visible: statusChatListCategory.opened
categoryId: statusChatListCategory.categoryId
filterFn: function (model) {
return !!model.parentItemId && model.parentItemId === statusChatList.categoryId
}
popupMenu: statusChatListCategory.chatListPopupMenu
}
+100 -126
View File
@@ -1,24 +1,22 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.13
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
Rectangle {
Item {
id: statusChatToolBar
implicitWidth: 518
height: 56
color: Theme.palette.statusAppLayout.backgroundColor
property alias chatInfoButton: statusChatInfoButton
property alias menuButton: menuButton
property alias notificationButton: notificationButton
property alias membersButton: membersButton
property alias searchButton: searchButton
property int notificationCount: 0
property int padding: 8
property int notificationCount: 0
property Component popupMenu
property var toolbarComponent
signal chatInfoButtonClicked()
signal menuButtonClicked()
@@ -26,150 +24,126 @@ Rectangle {
signal membersButtonClicked()
signal searchButtonClicked()
implicitWidth: 518
implicitHeight: 60
onPopupMenuChanged: {
if (!!popupMenu) {
popupMenuSlot.sourceComponent = popupMenu
}
}
StatusChatInfoButton {
id: statusChatInfoButton
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 12
width: Math.min(implicitWidth, parent.width - actionButtons.implicitWidth - anchors.leftMargin * 2)
onClicked: statusChatToolBar.chatInfoButtonClicked()
}
RowLayout {
width: parent.width
spacing: padding / 2
Row {
id: actionButtons
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
spacing: 8
StatusFlatRoundButton {
id: searchButton
width: 32
height: 32
icon.name: "search"
type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.searchButtonClicked()
// initializing the tooltip
tooltip.text: qsTr("Search")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
Loader {
id: loader
sourceComponent: statusChatToolBar.toolbarComponent
Layout.fillWidth: true
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
Layout.topMargin: padding
Layout.leftMargin: padding
}
StatusFlatRoundButton {
id: membersButton
width: 32
height: 32
icon.name: "group-chat"
type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.membersButtonClicked()
RowLayout {
id: actionButtons
Layout.alignment: Qt.AlignTop | Qt.AlignRight
Layout.topMargin: padding
Layout.rightMargin: padding
spacing: 8
// initializing the tooltip
tooltip.text: qsTr("Members")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
}
StatusFlatRoundButton {
id: searchButton
width: 32
height: 32
icon.name: "search"
type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.searchButtonClicked()
StatusFlatRoundButton {
id: menuButton
width: 32
height: 32
icon.name: "more"
type: StatusFlatRoundButton.Type.Secondary
visible: !!statusChatToolBar.popupMenu
// initializing the tooltip
tooltip.visible: !!tooltip.text && menuButton.hovered && !popupMenuSlot.item.opened
tooltip.text: qsTr("More")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
property bool showMoreMenu: false
onClicked: {
menuButton.highlighted = true
let originalOpenHandler = popupMenuSlot.item.openHandler
let originalCloseHandler = popupMenuSlot.item.closeHandler
popupMenuSlot.item.openHandler = function () {
if (!!originalOpenHandler) {
originalOpenHandler()
}
}
popupMenuSlot.item.closeHandler = function () {
menuButton.highlighted = false
if (!!originalCloseHandler) {
originalCloseHandler()
}
}
popupMenuSlot.item.openHandler = originalOpenHandler
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
statusChatToolBar.menuButtonClicked()
// initializing the tooltip
tooltip.text: qsTr("Search")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
}
Loader {
id: popupMenuSlot
active: !!statusChatToolBar.popupMenu
StatusFlatRoundButton {
id: membersButton
width: 32
height: 32
icon.name: "group-chat"
type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.membersButtonClicked()
// initializing the tooltip
tooltip.text: qsTr("Members")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
}
}
Rectangle {
height: 24
width: 1
color: Theme.palette.directColor7
anchors.verticalCenter: parent.verticalCenter
visible: notificationButton.visible &&
(menuButton.visible || membersButton.visible || searchButton.visible)
}
StatusFlatRoundButton {
id: menuButton
objectName: "chatToolbarMoreOptionsButton"
width: 32
height: 32
icon.name: "more"
type: StatusFlatRoundButton.Type.Secondary
visible: !!statusChatToolBar.popupMenu
StatusFlatRoundButton {
id: notificationButton
width: 32
height: 32
// initializing the tooltip
tooltip.visible: !!tooltip.text && menuButton.hovered && !popupMenuSlot.item.opened
tooltip.text: qsTr("More")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
icon.name: "notification"
icon.height: 21
type: StatusFlatRoundButton.Type.Secondary
property bool showMoreMenu: false
onClicked: {
menuButton.highlighted = true
// initializing the tooltip
tooltip.text: qsTr("Activity")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
let originalOpenHandler = popupMenuSlot.item.openHandler
let originalCloseHandler = popupMenuSlot.item.closeHandler
onClicked: statusChatToolBar.notificationButtonClicked()
StatusBadge {
id: statusBadge
visible: value > 0
anchors.top: parent.top
anchors.left: parent.right
anchors.topMargin: -3
anchors.leftMargin: {
if (statusBadge.value > 99) {
return -22
popupMenuSlot.item.openHandler = function () {
if (!!originalOpenHandler) {
originalOpenHandler()
}
}
if (statusBadge.value > 9) {
return -21
popupMenuSlot.item.closeHandler = function () {
menuButton.highlighted = false
if (!!originalCloseHandler) {
originalCloseHandler()
}
}
return -18
popupMenuSlot.item.openHandler = originalOpenHandler
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
statusChatToolBar.menuButtonClicked()
}
value: statusChatToolBar.notificationCount
border.width: 2
border.color: parent.hovered ? Theme.palette.baseColor2 : Theme.palette.statusAppLayout.backgroundColor
Loader {
id: popupMenuSlot
active: !!statusChatToolBar.popupMenu
}
}
Rectangle {
height: 24
width: 1
color: Theme.palette.directColor7
Layout.alignment: Qt.AlignVCenter
visible: notificationButton.visible &&
(menuButton.visible || membersButton.visible || searchButton.visible)
}
StatusActivityCenterButton {
id: notificationButton
width: 32
height: width
unreadNotificationsCount: statusChatToolBar.notificationCount
onClicked: statusChatToolBar.notificationButtonClicked()
}
}
}
}
+201
View File
@@ -0,0 +1,201 @@
import QtQuick 2.14
import QtGraphicalEffects 1.0
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
Item {
id: root
property int thickness: width * 0.1
property real minSaturate: 0.0
property real minValue: 0.0
property real maxSaturate: 1.0
property real maxValue: 1.0
property color color: "red"
property color rootColor: Qt.hsva(color.hsvHue, 1, 1, 1)
function pickColorFromHueGauge(x, y) {
// Get angle of picked color
let theta = Math.atan2(y - hueGauge.height / 2, x - hueGauge.width / 2) * 0.5 / Math.PI;
if (theta < 0.0)
theta += 1.0;
// Convert angle value to color
return Qt.hsva(1 - theta, 1, 1, 1)
}
function pickColorFromSatValRect(x, y) {
// x for saturation, reversed y for value
let sat = mapFromRange(Math.min(Math.max(x, 0), satValRect.width),
minSaturate, maxSaturate, satValRect.width);
let val = 1 - mapFromRange(Math.min(Math.max(y, 0), satValRect.height),
1 - maxValue, 1 - minValue, satValRect.height);
return Qt.hsva(rootColor.hsvHue, sat, val, 1);
}
function angleOnHueGauge(pickingColor) {
// color hue to angle
return (1 - pickingColor.hsvHue) * 2 * Math.PI;
}
// TODO: mapToRange & mapFromRange to helper js
function mapToRange(value, minValue, maxValue, range) {
return (value - minValue) / (maxValue - minValue) * range;
}
function mapFromRange(pos, minValue, maxValue, range) {
return pos / range * (maxValue - minValue) + minValue;
}
onColorChanged: {
// update root color if only we are not picking on satValRect
if (!d.pickingSatVal)
rootColor = Qt.hsva(color.hsvHue, 1, 1, 1)
}
implicitWidth: 340
implicitHeight: 340
QtObject {
id: d
property bool pickingSatVal: false
}
ConicalGradient {
id: hueGauge
anchors.fill: parent
angle: 90.0
gradient: Gradient {
GradientStop { position: 0.000; color: Qt.hsva(1.000, 1, 1, 1) }
GradientStop { position: 0.167; color: Qt.hsva(0.833, 1, 1, 1) }
GradientStop { position: 0.333; color: Qt.hsva(0.666, 1, 1, 1) }
GradientStop { position: 0.500; color: Qt.hsva(0.500, 1, 1, 1) }
GradientStop { position: 0.667; color: Qt.hsva(0.333, 1, 1, 1) }
GradientStop { position: 0.833; color: Qt.hsva(0.166, 1, 1, 1) }
GradientStop { position: 1.000; color: Qt.hsva(0.000, 1, 1, 1) }
}
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Item {
width: root.width
height: root.height
Rectangle {
anchors.fill: parent
radius: Math.min(width, height) / 2
}
}
}
MouseArea {
id: hueArea
property bool pressedOnGauge: false
anchors.fill: parent
preventStealing: true
onPressed: {
// Check we clicked on gauge
let dist = Math.sqrt(Math.pow(width / 2 - mouseX, 2) +
Math.pow(height / 2 - mouseY, 2));
let radius = Math.min(width, height) / 2;
if (dist < radius - thickness || dist > radius)
return;
pressedOnGauge = true;
pickRootColor();
}
onReleased: pressedOnGauge = false
onPositionChanged: if (pressedOnGauge) pickRootColor()
function pickRootColor() {
// Update both colors
rootColor = pickColorFromHueGauge(mouseX, mouseY);
color.hsvHue = rootColor.hsvHue;
color.hsvSaturation = Math.min(maxSaturate, Math.max(minSaturate, color.hsvSaturation));
color.hsvValue = Math.min(maxValue, Math.max(minValue, color.hsvValue));
}
}
}
Rectangle {
anchors.fill: parent
anchors.margins: root.thickness
radius: Math.min(width, height) / 2
color: Theme.palette.baseColor5
Rectangle {
id: satValRect
anchors.centerIn: parent
width: parent.width * 0.55
height: width
border.color: Theme.palette.baseColor3
gradient: Gradient {
orientation: Gradient.Horizontal
GradientStop { position: -minSaturate; color: "white" }
GradientStop { position: 2.0 - maxSaturate; color: rootColor }
}
Rectangle {
anchors.fill: parent
gradient: Gradient {
orientation: Gradient.Vertical
GradientStop { position: maxValue - 1; color: "transparent" }
GradientStop { position: 1.0 + minValue; color: "black" }
}
}
MouseArea {
id: satValArea
anchors.fill: parent
preventStealing: true
onPressed: {
d.pickingSatVal = true;
pickColor();
}
onReleased: d.pickingSatVal = false
onPositionChanged: pickColor()
function pickColor() {
root.color = pickColorFromSatValRect(mouseX, mouseY);
}
}
Rectangle {
id: satValLens
x: mapToRange(root.color.hsvSaturation, minSaturate, maxSaturate,
satValRect.width) - radius
y: mapToRange(1 - root.color.hsvValue, 1 - maxValue, 1 - minValue,
satValRect.height) - radius
width: thickness * 1.3
height: width
radius: height / 2
border.width: 2
border.color: Theme.palette.baseColor3
color: root.color
visible: x + 1 >= -radius && x - 1 <= satValRect.width - radius &&
y + 1 >= -radius && y - 1 <= satValRect.height - radius
}
}
}
Rectangle {
id: hueLens
property real theta: angleOnHueGauge(rootColor);
property real dist: (hueGauge.width - width) / 2 + thickness / 6;
anchors.centerIn: parent
anchors.horizontalCenterOffset: dist * Math.cos(theta);
anchors.verticalCenterOffset: dist * Math.sin(theta);
width: thickness * 1.3
height: width
radius: height / 2
border.width: 2
border.color: Theme.palette.baseColor3
color: rootColor
}
}

Some files were not shown because too many files have changed in this diff Show More