-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #244 from aaravlu/fix241
Display verification status as a badge atop the user profile icon
- Loading branch information
Showing
9 changed files
with
286 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
use makepad_widgets::*; | ||
|
||
live_design! { | ||
import makepad_widgets::base::*; | ||
import makepad_widgets::theme_desktop_dark::*; | ||
import makepad_draw::shader::std::*; | ||
|
||
import crate::shared::styles::*; | ||
|
||
VERIFICATION_YES = dep("crate://self/resources/icons/verification_yes.svg") | ||
VERIFICATION_NO = dep("crate://self/resources/icons/verification_no.svg") | ||
VERIFICATION_UNK = dep("crate://self/resources/icons/verification_unk.svg") | ||
|
||
VerificationIcon = <Icon> { | ||
icon_walk: { width: 23 } | ||
} | ||
IconYes = <View> { | ||
visible: false | ||
width: 31, height: 31 | ||
<VerificationIcon> { | ||
draw_icon: { | ||
svg_file: (VERIFICATION_YES), | ||
fn get_color(self) -> vec4 { | ||
return #x00BF00; | ||
} | ||
} | ||
} | ||
} | ||
IconNo = <View> { | ||
visible: false | ||
width: 31, height: 31 | ||
<VerificationIcon> { | ||
draw_icon: { | ||
svg_file: (VERIFICATION_NO), | ||
fn get_color(self) -> vec4 { | ||
return #xBF0000; | ||
} | ||
} | ||
} | ||
} | ||
IconUnk = <View> { | ||
visible: false | ||
width: 31, height: 31 | ||
<VerificationIcon> { | ||
draw_icon: { | ||
svg_file: (VERIFICATION_UNK), | ||
fn get_color(self) -> vec4 { | ||
return #x333333; | ||
} | ||
} | ||
} | ||
} | ||
|
||
VerificationNotice = <TooltipBase> { | ||
width: Fill, height: Fill, | ||
flow: Overlay | ||
|
||
draw_bg: { | ||
fn pixel(self) -> vec4 { | ||
return vec4(0., 0., 0., 0.0) | ||
} | ||
} | ||
|
||
content: <View> { | ||
flow: Overlay | ||
|
||
//The 'Fill' allows it shows anywhere we want over the app screen, | ||
//our goal is to set the global relative position to make it an illusion of following the cursor. | ||
width: Fill, height: Fill | ||
|
||
<RoundedView> { | ||
width: Fit, height: Fit, | ||
padding: 7, | ||
|
||
draw_bg: { | ||
color: (COLOR_TOOLTIP_BG), | ||
border_width: 1.0, | ||
border_color: #000000, | ||
radius: 2.5 | ||
} | ||
|
||
tooltip_label = <Label> { | ||
width: 230 | ||
draw_text: { | ||
text_style: <THEME_FONT_REGULAR>{font_size: SMALL_STATE_FONT_SIZE}, | ||
text_wrap: Word, | ||
color: #000 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.