mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(core): nativescript.config and webpack updates (#8801)
This commit is contained in:
14
apps/ui/src/action-bar/font-icons-page.ts
Normal file
14
apps/ui/src/action-bar/font-icons-page.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Frame, EventData, Button, ActionBar } from '@nativescript/core';
|
||||
|
||||
const iconModes = ['automatic', 'alwaysOriginal', 'alwaysTemplate', undefined];
|
||||
|
||||
export function navigate(args) {
|
||||
Frame.topmost().navigate('action-bar/clean-page');
|
||||
}
|
||||
|
||||
export function onChangeRenderingMode(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
const actionBar = <ActionBar>button.page.actionBar;
|
||||
actionBar.iosIconRenderingMode = <'automatic' | 'alwaysOriginal' | 'alwaysTemplate'>iconModes[(iconModes.indexOf(actionBar.iosIconRenderingMode) + 1) % iconModes.length];
|
||||
button.text = '' + actionBar.iosIconRenderingMode;
|
||||
}
|
||||
Reference in New Issue
Block a user