-
-
Notifications
You must be signed in to change notification settings - Fork 285
Add custom database type icons throughout UI #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "mariadb.svg", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "properties" : { | ||
| "preserves-vector-representation" : true, | ||
| "template-rendering-intent" : "template" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "mysql.svg", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "properties" : { | ||
| "preserves-vector-representation" : true, | ||
| "template-rendering-intent" : "template" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "postgresql.svg", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "properties" : { | ||
| "preserves-vector-representation" : true, | ||
| "template-rendering-intent" : "template" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "sqlite.svg", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "properties" : { | ||
| "preserves-vector-representation" : true, | ||
| "template-rendering-intent" : "template" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -46,7 +46,8 @@ struct ConnectionStatusView: View { | |||||||||||
| private var databaseInfoSection: some View { | ||||||||||||
| HStack(spacing: 6) { | ||||||||||||
| // Database type icon | ||||||||||||
| Image(systemName: databaseType.iconName) | ||||||||||||
| Image(databaseType.iconName) | ||||||||||||
| .renderingMode(.template) | ||||||||||||
| .font(.system(size: DesignConstants.IconSize.default)) | ||||||||||||
|
||||||||||||
| .font(.system(size: DesignConstants.IconSize.default)) | |
| .resizable() | |
| .aspectRatio(contentMode: .fit) | |
| .frame(width: DesignConstants.IconSize.default, | |
| height: DesignConstants.IconSize.default) |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -359,10 +359,12 @@ private struct ConnectionRow: View { | |||||||
|
|
||||||||
| var body: some View { | ||||||||
| HStack(spacing: 12) { | ||||||||
| // Database type indicator - uses custom color if set | ||||||||
| Circle() | ||||||||
| .fill(connection.displayColor) | ||||||||
| .frame(width: DesignConstants.IconSize.statusDot + 2, height: DesignConstants.IconSize.statusDot + 2) | ||||||||
| // Database type icon | ||||||||
| Image(connection.type.iconName) | ||||||||
| .renderingMode(.template) | ||||||||
| .font(.system(size: DesignConstants.IconSize.medium)) | ||||||||
|
||||||||
| .font(.system(size: DesignConstants.IconSize.medium)) | |
| .resizable() | |
| .aspectRatio(contentMode: .fit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
.font()modifier only works with SF Symbols loaded viaImage(systemName:). For custom asset images loaded withImage(_:), this modifier has no effect. Since you're now loading custom SVG icons from assets, you should either: 1) remove this line and use a frame size, or 2) add.resizable()modifier to make the image scalable. The recommended approach is to use.resizable().aspectRatio(contentMode: .fit).frame(width: size, height: size)to properly scale the custom icon.