mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 11:18:12 +08:00
Replace text-only tooltips with custom richly styled tooltips (#3436)
* Replace the title attribute with custom FloatingMenu tooltips * Separate tooltip labels and descriptions into two styled blocks * Move keyboard shortcut tooltips to a separate section at the bottom * Update shortcut key styling in tooltips and hints bar * Fix .to_string()
This commit is contained in:
@@ -410,7 +410,6 @@ pub fn input_mappings() -> Mapping {
|
||||
entry!(KeyDown(FakeKeyPlus); modifiers=[Accel], canonical, action_dispatch=NavigationMessage::CanvasZoomIncrease { center_on_mouse: false }),
|
||||
entry!(KeyDown(Equal); modifiers=[Accel], action_dispatch=NavigationMessage::CanvasZoomIncrease { center_on_mouse: false }),
|
||||
entry!(KeyDown(Minus); modifiers=[Accel], action_dispatch=NavigationMessage::CanvasZoomDecrease { center_on_mouse: false }),
|
||||
entry!(KeyDown(KeyF); modifiers=[Alt], action_dispatch=NavigationMessage::CanvasFlip),
|
||||
entry!(WheelScroll; modifiers=[Control], action_dispatch=NavigationMessage::CanvasZoomMouseWheel),
|
||||
entry!(WheelScroll; modifiers=[Shift], action_dispatch=NavigationMessage::CanvasPanMouseWheel { use_y_as_x: true }),
|
||||
entry!(WheelScroll; action_dispatch=NavigationMessage::CanvasPanMouseWheel { use_y_as_x: false }),
|
||||
|
||||
@@ -296,9 +296,9 @@ impl fmt::Display for Key {
|
||||
KeyboardPlatformLayout::Standard => "Ctrl",
|
||||
KeyboardPlatformLayout::Mac => "⌘",
|
||||
},
|
||||
Self::MouseLeft => "LMB",
|
||||
Self::MouseRight => "RMB",
|
||||
Self::MouseMiddle => "MMB",
|
||||
Self::MouseLeft => "Click",
|
||||
Self::MouseRight => "R.Click",
|
||||
Self::MouseMiddle => "M.Click",
|
||||
Self::MouseBack => "Mouse Back",
|
||||
Self::MouseForward => "Mouse Fwd",
|
||||
|
||||
@@ -321,7 +321,7 @@ impl From<Key> for LayoutKey {
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize, specta::Type)]
|
||||
pub struct LayoutKey {
|
||||
pub key: Key,
|
||||
key: Key,
|
||||
label: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user