Skip to content

Commit

Permalink
feat: window size tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillich committed Jan 31, 2024
1 parent 57a940d commit 736db16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ui/cluster_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewClusterWindow(app *gtk.Application, behavior *behavior.ClusterBehavior)
}
w.SetIconName("seabird")
w.SetTitle(fmt.Sprintf("%s - %s", behavior.ClusterPreferences.Value().Name, ApplicationName))
w.SetDefaultSize(900, 700)
w.SetDefaultSize(1000, 700)
if runtime.GOOS == "windows" {
w.SetDecorated(true) // https://gitlab.gnome.org/GNOME/gtk/-/issues/3749
}
Expand Down
11 changes: 6 additions & 5 deletions ui/detail_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ func NewDetailView(parent *gtk.Window, behavior *behavior.DetailBehavior) *Detai

d := DetailView{
NavigationPage: adw.NewNavigationPage(content, "main"),
prefPage: adw.NewPreferencesPage(),
behavior: behavior,
parent: parent,
expanded: map[string]bool{},
}

stack := adw.NewViewStack()

d.prefPage = adw.NewPreferencesPage()
d.prefPage.SetSizeRequest(350, 350)
clamp := d.prefPage.FirstChild().(*gtk.ScrolledWindow).FirstChild().(*gtk.Viewport).FirstChild().(*adw.Clamp)
clamp.SetTighteningThreshold(300)
clamp.SetMaximumSize(10000)

stack := adw.NewViewStack()
stack.AddTitledWithIcon(d.prefPage, "properties", "Properties", "document-properties-symbolic")
stack.AddTitledWithIcon(d.createSource(), "source", "Source", "accessories-text-editor-symbolic")

Expand Down Expand Up @@ -149,12 +150,12 @@ func (d *DetailView) renderObjectProperty(level, index int, prop behavior.Object
label.AddCSSClass("caption")
label.AddCSSClass("dim-label")
label.SetVAlign(gtk.AlignStart)
label.SetEllipsize(pango.EllipsizeEnd)
box.Append(label)

label = gtk.NewLabel(prop.Value)
label.AddCSSClass("caption")
label.SetWrap(true)
label.SetMaxWidthChars(50)
label.SetEllipsize(pango.EllipsizeEnd)
box.Append(label)

Expand Down

0 comments on commit 736db16

Please sign in to comment.