Enlarge the quick panel of sublime text - width

I am looking for a way to enlarge the quick panel (when you type Ctrl + Alt + P and then select install Package) because when I want to install a new package from the Package Control, I can't see the whole github link.
I thought the configuration was in a sublime-theme file but I can't find the property to make the width bigger.
In fact I am using the Phoenix theme so I created a Phoenix Dark.sublime-theme in my User folder and I tried different values for quick_panel playing with padding and margin. Nothing is correct.
[
{
"class": "quick_panel",
"row_padding": [0, 2]
},
{
"class": "quick_panel_row",
"layer0.texture": "Theme - Phoenix/Phoenix Dark/quick-panel-row.png",
"layer0.inner_margin": [2, 2, 2, 2]
}
]
If this is not possible, maybe there is something to display the details of a package?
if someone have an idea?
Thnks

If you're just looking for the Github link, the Package Control website is a great resource. It's fully searchable (package name and short description), and each package's page presents a nice combination of data, including the README from Github/bitbucket, info on Sublime versions and platforms supported, installation statistics so you can see how popular a particular package is and when it was last updated, and links to the project's Issues page as well as a Gittip link in case you want to donate to support the author(s). I usually do all my research there first, then go to the Command Palette quick panel when I'm ready to install.

Related

rid3, shadow-cljs & drag; different behavior in dev and prod

I'm creating an application which can be used to make an overview of your IT-Landscape. Currently it can show a table with the interfaces in your environment and their connected applications. It is also capable of creating an SVG image from this data. The data it self can be added via API calls.
I started with a project via:
leiningen new luminus versiontracker +h2 +shadow-cljs +kee-frame +swagger +(some other)
To be able to generate the SVG file with drag-and-drop support I added rid3 to the project .clj file.
When I run the application in development mode:
lein repl
and
lein shadow-cljs watch app
I can drag any item in the SVG file that is generated. I can click on a circle and drag it to any place I want.
However when I create the 'production' version with:
lein uberjar
and then run this application using:
java -Dconf=config.edn -jar versiontracker.jar
Dragging an object is not working properly. The whole SVG is selected instead of a single object within the SVG image; which result in strange drag-and-drop behavior.
Looking at the event through the console window I can see different behavior.
In the development environment if I grab a circle (which has the drag function attached) the srcElement in the sourceEvent is the text that is displayed on top of this circle. Although not the circle is selected dragging works as expected. The selected item follows the mouse while dragging.
In the 'production' environment if I grab a circle the srcElement in the sourceEvent is the complete svg; which result in strange drag-and-drop behavior. The selected item does not follow the mouse but the items do start moving around in an unpredictable way.
Go to Version Tracker download the release with tag V0.3.0 for the production version (there is also an H2 database with some sample data) and compare it to the development version by checking out the project.
Any help is appreciated
Your error description is a bit lacking and the project is far too complex to quickly reproduce.
Do you get any externs inference warnings when building? Do you get any errors/warnings in the Browser console with a production build?
The most likely cause here is externs. Meaning that property names such as in this (set! (.-fx d) (.-x event)) may end up getting renamed or stripped. As such it would break any behavior that relies in picking the correct names. See the documentation for further info on the subject. It might be enough to add a couple ^js hints in the proper places.
You are also using a rather old shadow-cljs version (current as of today is 2.16.10). So you need to opt-in to get externs inference warnings via :compiler-options {:infer-externs :auto} in your build config. The newer versions have this enabled by default.

How do you specify Mermaid configuration within Gitlab Markdown?

In Gitlab, I've been able to render an Entity Relationship Diagram with Mermaid in a Markdown file as specified here.
This is the Markdown I used:
```mermaid
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
```
The mermaid interactive editor provides an example of configuration:
{
"theme": "default"
}
But I don't know where to locate that configuration information. I've tried putting it in the same directory, in a file called config.json or mermaid-config.json, but neither of those have worked. I also tried including it in the Markdown which defined the diagram, which only caused it to render incorrectly. Is there a way to specify the theme or other CSS elements for Gitlab?
Just tried it out and it worked
```mermaid
%%{init: { 'theme':'dark', 'sequence': {'useMaxWidth':false} } }%%
sequenceDiagram
alice ->> mark: Sent a flower
```
Edit: If you are using a recent enough version of GitLab (possibly 13.9.0 from February, 2021, which changes the shipped version of Mermaid from 8.5.2 to 8.9.0) you can use directives, as mentioned in the other answers:
```mermaid
%%{init: { 'logLevel': 'debug', 'theme': 'dark' } }%%
graph LR
%%{config: { 'fontFamily': 'Menlo', 'fontSize': 18, 'fontWeight': 400} }%%
A-->B
```
Note that Mermaid seems to be sensitive to newlines here. If I add a blank line between graph LR and the following %%{config line I get a syntax error.
Original answer for older versions of GitLab:
I don't believe you can, unless you want to self-host and modify the GitLab source code.
The Mermaid.js configuration in GitLab is largely hard-coded. It looks like it uses the neutral theme by default and switches to the dark theme if
the user is using dark or solarizedDark as their web IDE theme, and
if the user is on the IDE web page.
Unfortunately current GitLab uses mermaidjs version 8.5.2 as per merge request
From mermaid 8.6 onward you should be able to use directives to set the theme and/or other settings without touching the hard coded css. For example:
%%{init: { 'theme': 'forest' } }%%
erDiagram
...
I'm afraid we have to wait a little longer, until GitLab updates to this version. You can check in the meantime mermaids doc on the matter. You can includes this already in your markdown, as the %% is interpreted as comments and will not show up in the rendering. But when GitLab makes the move, your pages should immediately update.

PlantUML and notes on packages

I am trying to figure out how PlantUML manages notes. Below you can see a small example where the behavior seems buggy.
#startuml
package package{
'note bottom : this seems to be the correct place, but brings an error
artifact system
note right : this links to the system as it should
}
note bottom: This should link to the \npackage, not the last element\nin the package list.
note "Link to the package" as test
test .- package
#enduml
This code compiles to the diagram below:
As you can see I want to add a note to a package of elements. According to the wiki 2 you could use
note bottom
to attach a note to the element last defined. When I try this right after the package was opened I get an compile error as nothing is present to attach the note to. Therefore I tried adding the note bottom directly after the package is closed. In this case the note is attached to the last element that was created inside the package.
I know that I can create notes and link them to every element as shown in the last example. But here I can't use the right, left, top, bottom keywords to manage the position. Does anybody know, if this is a bug or if I have to place my note somewhere else in the code?
Looks like you (and some of the documentation) are missing of as in note bottom of package
#startuml
package package {
'note bottom : this seems to be the correct place, but brings an error
artifact system
note right : this links to the system as it should
}
note bottom of package: This should link to the \npackage, not the last element\nin the package list.
note "Link to the package" as test
test .- package
#enduml

In XCode Swift project - Material Icons not showing in app

Screen capture of Material styled screen
I need help configuring Material with my Swift project.
As you can see I am able import Material into my project, however the buttons (except for the switchControl) are not appearing. The assets can be seen in the project's Media Library.
I don't know how to test my integration. I'm looking at the MaterialIcon.swift file because I don't think that the path to resources is correct.
I've compared my build to the examples provided by CM and I need help.
Thanks.
If you are using CocoaPods to setup your project, which I think you are based on your issue. You have two options:
Clean the build folder and delete the UserDerived directory, as well, ensure you are using 1.0* of CocoaPods.
Copy the Assets catalog into your application.
All the best :)
Make sure that you are giving the elements a size also.
Let Button = FabButton()
Button.setButtonTitle(title: "Button", forState: .Noarmal)
view.addSubview(Button)
View.Layout(Button).top(0).left(0).width(80).height(80)

Trying to install custom font in xcode 4.2, iOS 5.0, but receiving error "Validation failed: [duplicate]

I want to use font "MgOpen Modata" in my iphone App. But I dont see it in the font list in Property inspector.
How do I include that font so that I can use it?
Add the font files to your resource files
Edit your Info.plist: Add a new entry with the key Fonts provided by application.
For each of your files, add the file name to this array
On the example below, I've added the font "DejaVu Sans Mono":
In your application you can the use [UIFont fontWithName:#"DejaVuSansMono-Bold" size:14.f].
Or if you want to use it in html/css, just use font-family:DejaVu Sans Mono;
Note: this is available in iOS 3.2 and later.
I found this walkthrough was the best
Although the above accepted answer does work I found that if you added text into an XIB file and then set the font to our new font then the text didn't update.
Making sure the new font is included in resources fixed this problem (taken directly from walkthrough):
"This should not be a problem but sometimes when you’re having trouble getting your font face to show up, this can be a source of headache so let’s double check now to rule it out as a potential pitfall.
Go to your project Build Phases pane by highlighting the XCode project file in your solution explorer and on the right hand side, select “Build Phases”. You’ll see that one of the sections you can expand is “Copy Bundle Resources”. Open that list and make sure that your fonts are included in that list."
The other stuff in the walkthrough is the same kind of stuff (add the file to your project and to the plist file too)
All credit to Code with Chris for this answer which saved me a lot of time and effort and I am merely copying a shot from his page to allow this answer to stand on its own feet instead of requiring you to click the link.
I think is better for a dev to have the plist structure as raw source code. I'm leaving it for copy/paste:
<key>UIAppFonts</key>
<array>
<string>Roboto-BoldItalic.ttf</string>
<string>Roboto-Medium.ttf</string>
<string>Roboto-MediumItalic.ttf</string>
<string>Roboto-Regular.ttf</string>
<string>Roboto-Bold.ttf</string>
</array>
Copy this snippet and modify the strings keys into the array to your desired fonts. Hint: To view the plist as raw source code please click secondary button over the file and select Open As -> Source code.
EDIT
// Logs fonts ordered by name
for (NSString* family in [[UIFont familyNames] sortedArrayUsingSelector:#selector(compare:)])
{
NSLog(#"%#", family);
for (NSString* name in [[UIFont fontNamesForFamilyName:family] sortedArrayUsingSelector:#selector(compare:)])
{
NSLog(#" %#", name);
}
}
After adding the fonts could be useful to add to (for example) the AppDelegate.m class to see what are the real fonts names (on the bundle). A problem I encountered various times that I was loading the fonts with a wrong name assuming that the font filename as the correct one. Sometimes it differs from the bundle real name.
In addition to this you can check the file full name using the file info window (cmd+i) on finder (macOS).
Example to clarify:
File Name = "DroidSansEthiopic-Regular"
Processed Name in bundle = "Droid Sans Ethiopic"
Don't forget to add the fonts to the targets compile bundle resources by going to 'Targets' -> 'Build Phases' -> 'Copy Bundle Resources' and add all the fonts manually
Most of the time we forget to add font to the application Target. Make sure you did not forget this important step. Mind checking right panel File Inspector > Target Membership checkbox.
Also you can check wether font is added well to your application or not by running this code snippet in anywhere on your app.
for (NSString* family in [UIFont familyNames])
{
NSLog(#"%#", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family])
{
NSLog(#" %#", name);
}
}
EDIT
ALPHABETIC ORDER:
for (NSString* family in [[UIFont familyNames] sortedArrayUsingSelector:#selector(compare:)])
{
NSLog(#"%#", family);
for (NSString* name in [[UIFont fontNamesForFamilyName:family] sortedArrayUsingSelector:#selector(compare:)])
{
NSLog(#" %#", name);
}
}
This will populate a list of available fonts in your app, where your added font will also appear.
Its Easy and simple now- Tested in Xcode 9.2 and swift 4
Steps to add font to your Xcode
Select your UILabel, UITextField or whatever then under fonts section and follow
Step 1
Select settings menu from left corner of font selection screen. And choose font manager option.
Step 2
Click on the add button as marked below.
Step 3
Select the folder that contains your font. It will be loaded into XCode fonts list.
Steps to add fonts to your project
Don't forget to add description to your plist with the key Fonts provided by application. and put font files inside copy bundle resources under project target settings.
Yes! thats it.. njoy..
You can use [UIFont fontWithName:#"ArialMT" size:14]; method directly, if you want to change your font style. Also all the fonts may not be available in iphone library.Just refer this for available font styles.
If you have .otf format. sometime this format doesnt work. Convert .otf format to .ttf. There are bunch of font converter online.
Once you add the custom font to your .plist file under Fonts provided by application as explained above. Make sure in your Project Target under Build Phase -> copy Bundel Resourse that file is present. If not then add it.
Then just in your code add this [UIFont fontWithName:#"your custom font" size:your choice of size];
In Xamarin iOS
Step 1:
First of all you have to add your .ttf or .otf file into your Project.
like Roboto-BoldItalic.ttf .
Step 2 :
Right click on the Font and select property
Build Action --> Content
Copy to output directory --> Always Copy
Step 3:
go to info.plist
select property Fonts provided by application and add the font name.
Step 4:
set Font programatically below way
account.Font = UIFont.FromName("Roboto-BoldItalic", 18f);

Resources