I'm trying to set the minimum size of the window of a creative suite extension. I don't want the user to be able to resize the window to a smaller size than the one I define.
Here is what I've tried to do:
var instance:CSXSInterface = CSXSInterface.getInstance();
var extension:Extension = instance.getExtensions([instance.getExtensionId()]).data[0] as Extension;
extension.minHeight = 350;
extension.minWidth = 250;
Unfortunately this doesn't work. I've also tried to set it in the mxml:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%" height="100%" minWidth="250" minHeight="350" currentState="Loading"
historyManagementEnabled="false" layout="absolute">
But it doesn't do the trick either. Does anyone know the solution to this problem? I've seen other extensions doing it, namely the Adobe Kuler extension.
Turns out this is a setting in the manifest file.
In Extension builder, right click on the project, CS Extension Builder > Bundle Manifest Editor. Under the Extension tab, select User Interface. Minimum width and height are some of the settings that can be defined there, along with the extension icon for instance.
Related
According to this article:
https://useyourloaf.com/blog/restricting-dynamic-type-sizes/
And this WWDC 2021 video:
https://developer.apple.com/videos/play/wwdc2021/10059/?time=879
The minimumContentSizeCategory and maximumContentSizeCategory can limit the min and max font size when user uplevel/downlevel the font sizes in System Accessibility settings.
However I tried it out, and from the debugging info these two settings are properly set, but in view rendering, the font size still goes to very large if accessibility font size is very large.
// before setting
print(label.appliedContentSizeCategoryLimitsDescription)
label.minimumContentSizeCategory = .small
label.maximumContentSizeCategory = .accessibilityMedium
// after setting
print(label.appliedContentSizeCategoryLimitsDescription)
print results:
UILabel:0x7fd610a414a0: AX-L
--> AX-L
UILabel:0x7fd610a414a0: S <= (none->)AX-M <= AX-M
--> AX-M
How can I properly use these two settings?
Any ideas on how to properly use these two settings?
I hope that's the proper way because I use them as you did (and it works).
I created a blank project in Interface Builder (Xcode 13.4.1) as follows:
... and the Dynamic Type feature is blocked within the specified thresholds I defined like you (in the viewDidLoad of the view controller).
I think you should check out the way you created your label because, with the above one, it works like a charm.
Vaadin 14.2.0.alpha7 added new functionality to Dialog component (https://vaadin.com/api/platform/14.2.0.alpha7/com/vaadin/flow/component/dialog/Dialog.html), especially the resizing availability. Unfortunately I was unable to find a way to have dialog being created with width I need neither to set the width programmatically after the dialog is opened.
Here are few lines of code I use for described purposes (unsuccessfully):
dialog.isResizable = true
dialog.width = "900px"
dialog.addOpenedChangeListener { event ->
println("!!!opened-changed event fired")
dialog.width = "900px"
println("!!!dialog width = ${dialog.width}")
}
dialog.addResizeListener { event ->
println("!!! on resize event width = ${dialog.width}")
}
When I open the dialog it appears with its limited width (around 500px), the OpenedChanged event being fired and prints that dialog has 900px width (while its not!), when I resize it manually the Resize event being fired and prints that dialog has around 600px width (after I increased it a bit manually using mouse).
I know that early versions of Dialog had limited width (around 500px) in templates and there is workaround with importing styles to adjust dialog width. I was hoping with new version to increase dialog width without touching templates and client-side.
Is there any way to set dialog width and adjust on being opened programmatically without touching client-side templates?
P.S. The 14.2.0 version announced to be published on April so I believe the question is suitable even for now its prerelease version.
This happens due to the max-width setting of ~560px to comply with the materials design. There is a ticket about it here: Dialog Size - Material Theme. (In the default Lumo theme this works out of the box. You can verify it by commenting out #Theme(value = Material::class, variant = Material.LIGHT) in MainLayout.kt)
Unfortunately, as style targets the overlay part, the only one way to overcome this is using style files. On the other hand, it should be pretty straightforward in the current version :)
I created a pull request to your repo with the changes needed. Feel free to use it, if you want Make width acccept values more than 500px :)
I have a project I am working on in Ionic and the client has asked if the font size can be reduced on the select inputs.
This is a random picture from Google, but shows the select 'scroller' on iOS that I am referencing:
The blue, green and red options are what need smaller font size. I'm pretty sure that it can't be done, easier for me too.
You dont state which version of ionic you are using, so i will assume it is the latest version.
Each component in ionic has assigned sass variables which can be used to target the specific element of the component which can then be used to style it accordingly.
In your theme/variables.scss file you can target a variable which will then override the default style. In your case that would be the font size of the select. Now for this use case the font size is an inherited property and does not have a specific sass variable assigned to it ( you can view all the sass variables for the select here)
So in that case to override the default styles you have to explicitly wrap your scss code with
.ios,.md,.wp{
// your style here
}
From your image it looks like you are using the "action sheet select" style. which would target .action-sheet-ios .action-sheet-button class to change the font size.
.ios{
.action-sheet-ios .action-sheet-selected,
.action-sheet-ios .action-sheet-button{
font-size:1rem;
}
}
This targets ios specifically.
this can be done through css. first serve your app through the lab
ionic serve --lab
Than inspect element from chrome and select your text component and find its class. and Then you can add your custom CSS Styling.
Cheers :D
as you can see in the above i'm trying to change my textView's font , but it didn't changing i searched some related terms on changing for like this one
and this , but nothing worked for me
i'm also not sure if this is the correct name of my desired font or not
titleTextView.font = UIFont(name: "Myriad-Condensed", size: 25)
even in this site they dont have anything related to my desired font which is Myriad pro Condensed according to storyboard's attribute inspector
anyone faced anything similar to this before ?? or any clue what i should do ? then please let me know
First you need a font to use. Download any of them in you cass its right here : http://ufonts.com/fonts/myriadpro-cond.html
After downloading drag & drop the font file (otf or ttf) into your project
Make sure you check the box next to your target or the font won’t actually get included in your app (even though it’ll probably show in Interface Builder).
Open up the Info.plist . Add a new array of strings to it: “Fonts provided by application”. Add the filenames for each font you want to use as String entries in the array. (That one ttf file you just added to your project )
Now you're good to go , select that font once again like you did in the attached image.
For more detail see this article https://grokswift.com/custom-fonts/
So I have an annoying issue that I can't solve. I am creating an app in Flash Pro/AS3 for iOS. I have a button whose label font I want to change:
var ButtonTextFormat:TextFormat = new TextFormat("Showcard Gothic", 120);
//ButtonTextFormat.size = 120;
//ButtonTextFormat.font = "Showcard Gothic";
//ButtonTextFormat.embedFonts = true;
ButtonTextFormat.color = 0x00FF00;
//ButtonTextFormat.embedFonts = true;
SMButton.label = "PUSHME!";
SMButton.setStyle("textFormat", ButtonTextFormat);
I just used the standard button found in the Components Toolbox in Flash.
It displays correctly during debug, but once loaded into the iPhone, the label is changed to a default font.
I did embed the desired font through Text>Font Embedding... and it works for a text field that I have, but why not the button label?
I've tried ButtonTextFormat.embedFonts = true; but I get an error:
1119: Access of possibly undefined property embedFonts through a reference with static type flash.text:TextFormat.
Any help would be appreciated. Thanks.
embedFonts property is for TextField class, not for TextFormat class.
Follow this instructions to embed and use your embeded font properly Embedding Fonts for Components in Flash
I had the same problem recently. For components, you must set embedFonts with the .setStyle() method.
SMButton.setStyle("fontFamily", "Showcard Gothic");
SMButton.setStyle("embedFonts", true);
In the Flash IDE, you may need to add your font to the Library, and then export for ActionScript. The class name "TreasureMapDeadhand" for example.
Then in your document class:
import flash.text.Font;
Font.registerFont(TreasureMapDeadhand);
Another option if your linking your font multiple times, although not necessary, is store your font in a public var.
public var f:Font = new TreasureMapDeadhand();
SMButton.setStyle("fontFamily", f.fontName);
SMButton.setStyle("embedFonts", true);
Anyway, I hope this helps!