Skip to content

Linux + iPhone Continuity / iMessage / SMS

fix(gtk): dialog CSD

Zack Bartelb4f180016f49
diff --git a/src/gtk/devices_view.cpp b/src/gtk/devices_view.cpp
index 667175f..8d5ffa7 100644
--- a/src/gtk/devices_view.cpp
+++ b/src/gtk/devices_view.cpp
@@ -775,11 +775,14 @@ namespace tether::ui {
using PathList = std::vector<std::filesystem::path>;
- // Undecorated so every desktop shows the same card; the window owns the paths until a tile is picked.
+ // A hidden titlebar gives client-side decorations with no title bar, the same card on every desktop.
+ // The window owns the paths until a tile is picked.
void show_send_picker(PathList paths, const std::vector<std::pair<std::string, std::string>>& devices) {
GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), _("Send to…"));
- gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
+ GtkWidget* titlebar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_widget_set_no_show_all(titlebar, TRUE);
+ gtk_window_set_titlebar(GTK_WINDOW(window), titlebar);
gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
gtk_window_set_skip_taskbar_hint(GTK_WINDOW(window), TRUE);
gtk_window_set_keep_above(GTK_WINDOW(window), TRUE);
diff --git a/src/gtk/ui_util.cpp b/src/gtk/ui_util.cpp
index ad78f90..5adb3e4 100644
--- a/src/gtk/ui_util.cpp
+++ b/src/gtk/ui_util.cpp
@@ -141,15 +141,12 @@ namespace tether::ui {
}
/* "Send to" picker */
-.tether-picker-window { background-color: transparent; }
-.tether-picker {
- background-color: @theme_bg_color;
- border: 1px solid alpha(@theme_fg_color, 0.12);
- border-radius: 18px;
- padding: 20px 24px;
- margin: 12px;
- box-shadow: 0 4px 16px alpha(black, 0.3);
+.tether-picker-window, .tether-picker-window decoration { border-radius: 12px; }
+.tether-picker-window { background-color: @theme_bg_color; }
+.tether-picker-window decoration {
+ box-shadow: 0 4px 16px alpha(black, 0.3), 0 0 0 1px alpha(@theme_fg_color, 0.12);
}
+.tether-picker { padding: 20px 24px; }
.tether-picker-title { font-size: 17px; font-weight: bold; }
.tether-picker-tile {
min-width: 128px;