mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 16:38:13 +08:00
Add full support for Mac-specific keyboard layouts (#736)
* IPP for Mac, flawed initial experiments
* Cleanup and progress, but not compiling yet
* Fix error and rename nonmac -> standard
* Extentd ipp macros to accomodate mac input
* Add Mac versions of shortcuts; refactor and document the input mapper macros
* Change frontend styling for user input labels in floating menus
* Additional macro documentation
* A little more documentation
* Improve entry macro syntax
* Move input mapper macros to a separate file
* Adapt the keyboard shortcuts to the user's OS
* Display keyboard shortcuts in the menu bar based on OS
* Change Input Mapper macro syntax from {} to ()
* Fix esc key bug in Vue
* Tweaks
* Interim solution for Mac-specific hints
* Feed tooltip input hotkeys from their actions
* Fix hotkeys for tools because of missing actions
* Make Vue respect Ctrl/Cmd differences per platform
* Remove commented lines
* Code review pass by me
* Code review suggestions with TrueDoctor
* Turn FutureKeyMapping struct into ActionKeys enum which is a bit cleaner
* Add serde derive attributes for message discriminants
* Re-add serde deserialize
* Fix not mutating ActionKeys conversion; remove custom serializer
* Add serde to dev dependencies
Co-authored-by: Dennis <dennis@kobert.dev>
This commit is contained in:
co-authored by
Dennis
parent
fa461f3157
commit
f39d6bf00c
@@ -1,4 +1,5 @@
|
||||
use super::clipboards::{CopyBufferEntry, INTERNAL_CLIPBOARD_COUNT};
|
||||
use super::utility_types::Platform;
|
||||
use super::{DocumentMessageHandler, MenuBarMessageHandler};
|
||||
use crate::consts::{DEFAULT_DOCUMENT_NAME, GRAPHITE_DOCUMENT_VERSION};
|
||||
use crate::dialog;
|
||||
@@ -23,6 +24,7 @@ pub struct PortfolioMessageHandler {
|
||||
active_document_id: Option<u64>,
|
||||
copy_buffer: [Vec<CopyBufferEntry>; INTERNAL_CLIPBOARD_COUNT as usize],
|
||||
font_cache: FontCache,
|
||||
pub platform: Platform,
|
||||
}
|
||||
|
||||
impl PortfolioMessageHandler {
|
||||
@@ -473,6 +475,7 @@ impl MessageHandler<PortfolioMessage, &InputPreprocessorMessageHandler> for Port
|
||||
responses.push_back(MovementMessage::TranslateCanvas { delta: (0., 0.).into() }.into());
|
||||
}
|
||||
SetActiveDocument { document_id } => self.active_document_id = Some(document_id),
|
||||
SetPlatform { platform } => self.platform = platform,
|
||||
UpdateDocumentWidgets => {
|
||||
if let Some(document) = self.active_document() {
|
||||
document.update_document_widgets(responses);
|
||||
|
||||
Reference in New Issue
Block a user