Skip to content
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

fix: make all headerbar centering policies loose #967

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion data/ui/dialogs/compose.ui
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<property name="hexpand">1</property>
<property name="show_end_title_buttons">0</property>
<property name="show_start_title_buttons">0</property>
<property name="centering-policy">strict</property>

<property name="title-widget">
<object class="AdwViewSwitcher" id="title_switcher">
Expand Down
3 changes: 0 additions & 3 deletions data/ui/dialogs/new_account.ui
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<child type="top">
<object class="AdwHeaderBar">
<property name="show-title">0</property>
<property name="centering-policy">strict</property>
<property name="show-end-title-buttons">0</property>
<property name="show-start-title-buttons">0</property>
<child>
Expand Down Expand Up @@ -126,7 +125,6 @@
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<property name="centering-policy">strict</property>
<property name="show-title">0</property>
<property name="show-end-title-buttons">0</property>
<property name="show-start-title-buttons">0</property>
Expand Down Expand Up @@ -214,7 +212,6 @@
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<property name="centering-policy">strict</property>
<property name="show-back-button">0</property>
<property name="show-title">0</property>
<property name="show-end-title-buttons">0</property>
Expand Down
5 changes: 2 additions & 3 deletions data/ui/dialogs/profile_edit.ui
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<property name="centering-policy">strict</property>
<property name="show-end-title-buttons">0</property>
<property name="show-start-title-buttons">0</property>
<child type="start">
Expand Down Expand Up @@ -77,7 +76,7 @@
</object>
</child>
<property name="child">
<object class="GtkOverlay">
<object class="GtkOverlay">
<property name="vexpand">1</property>
<property name="hexpand">1</property>
<property name="child">
Expand Down Expand Up @@ -105,7 +104,7 @@
</style>
</object>
</child>
</object>
</object>
</property>
</object>
</child>
Expand Down
3 changes: 1 addition & 2 deletions data/ui/views/base.ui
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<property name="bottom-bar-style">flat</property>
<child type="top">
<object class="AdwHeaderBar" id="header">
<property name="centering-policy">strict</property>
</object>
</child>

Expand Down Expand Up @@ -184,4 +183,4 @@
</child>

</template>
</interface>
</interface>
3 changes: 1 addition & 2 deletions data/ui/views/media_viewer.ui
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
</style>
<child type="top">
<object class="AdwHeaderBar" id="headerbar">
<property name="centering-policy">strict</property>
<property name="title-widget">
<object class="GtkLabel">
<property name="label" translatable="yes">Media Viewer</property>
Expand Down Expand Up @@ -172,4 +171,4 @@
</object>
</child>
</template>
</interface>
</interface>
3 changes: 1 addition & 2 deletions data/ui/views/sidebar/view.ui
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<property name="centering-policy">strict</property>
<child type="start">
<object class="GtkMenuButton" id="accounts_button">
<property name="tooltip_text" translatable="yes">Switch Account</property>
Expand Down Expand Up @@ -106,4 +105,4 @@
</style>

</template>
</interface>
</interface>
4 changes: 1 addition & 3 deletions src/Dialogs/Composer/AttachmentsPageAttachment.vala
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ public class Tuba.AttachmentsPageAttachment : Widgets.Attachment.Item {
scroller.child = alt_editor;

var toolbar_view = new Adw.ToolbarView ();
var headerbar = new Adw.HeaderBar () {
centering_policy = Adw.CenteringPolicy.STRICT
};
var headerbar = new Adw.HeaderBar ();

var bottom_bar = new Gtk.ActionBar ();
dialog_char_counter = new Gtk.Label (remaining_alt_chars (alt_text != null ? alt_text.length : 0)) {
Expand Down
4 changes: 1 addition & 3 deletions src/Dialogs/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ public class Tuba.Dialogs.MainWindow: Adw.ApplicationWindow, Saveable {
scroller.child = clamp;

var toolbar_view = new Adw.ToolbarView ();
var headerbar = new Adw.HeaderBar () {
centering_policy = Adw.CenteringPolicy.STRICT
};
var headerbar = new Adw.HeaderBar ();

toolbar_view.add_top_bar (headerbar);
toolbar_view.set_content (scroller);
Expand Down
3 changes: 1 addition & 2 deletions src/Dialogs/Report.vala
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ public class Tuba.Dialogs.Report : Adw.Dialog {
var toolbarview = new Adw.ToolbarView ();
var headerbar = new Adw.HeaderBar () {
show_end_title_buttons = false,
show_start_title_buttons = false,
centering_policy = Adw.CenteringPolicy.STRICT
show_start_title_buttons = false
};
back_button = new Gtk.Button.with_label (_("Cancel"));
back_button.clicked.connect (on_back);
Expand Down
4 changes: 1 addition & 3 deletions src/Views/Profile.vala
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,7 @@ public class Tuba.Views.Profile : Views.Accounts {
height_request = 32
};
var toolbar_view = new Adw.ToolbarView ();
var headerbar = new Adw.HeaderBar () {
centering_policy = Adw.CenteringPolicy.STRICT
};
var headerbar = new Adw.HeaderBar ();
var toast_overlay = new Adw.ToastOverlay () {
vexpand = true,
valign = Gtk.Align.CENTER
Expand Down
4 changes: 1 addition & 3 deletions src/Widgets/Attachment/Item.vala
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ public class Tuba.Widgets.Attachment.Item : Adw.Bin {
};

var toolbar_view = new Adw.ToolbarView ();
var headerbar = new Adw.HeaderBar () {
centering_policy = Adw.CenteringPolicy.STRICT
};
var headerbar = new Adw.HeaderBar ();
var window = new Adw.Dialog () {
title = _("Alternative text for attachment"),
child = toolbar_view,
Expand Down
Loading