fix timer

This commit is contained in:
2026-02-10 13:30:25 +01:00
parent d1b81c4d3e
commit 55a76be186
10 changed files with 38 additions and 28 deletions
@@ -29,9 +29,8 @@ BluetoothSettingsRow::BluetoothSettingsRow(const BluetoothDevice &device)
deviceInfoBox.set_spacing(2);
append(deviceInfoBox);
std::string shortName = StringHelper::trimToSize(device.name.empty() ? "Unknown Device" : device.name, 14);
nameLabel.set_text(shortName);
nameLabel.set_ellipsize(Pango::EllipsizeMode::END);
nameLabel.set_text(device.name.empty() ? "Unknown Device" : device.name );
nameLabel.set_halign(Gtk::Align::START);
nameLabel.set_valign(Gtk::Align::CENTER);
deviceInfoBox.append(nameLabel);
@@ -41,6 +40,7 @@ BluetoothSettingsRow::BluetoothSettingsRow(const BluetoothDevice &device)
addressLabel.set_valign(Gtk::Align::CENTER);
addressLabel.add_css_class("bluetooth-device-address");
deviceInfoBox.append(addressLabel);
deviceInfoBox.set_size_request(140, -1);
auto buttonBox = Gtk::Box(Gtk::Orientation::HORIZONTAL);
buttonBox.set_hexpand(true);
@@ -80,9 +80,7 @@ void BluetoothSettingsRow::updateDevice(const BluetoothDevice &device) {
spdlog::info("Updating device {}: paired={}, connected={}, trusted={}", device.name, device.paired, device.connected, device.trusted);
std::string shortName = StringHelper::trimToSize(device.name.empty() ? "Unknown Device" : device.name, 14);
nameLabel.set_text(shortName);
nameLabel.set_text(device.name.empty() ? "Unknown Device" : device.name);
addressLabel.set_text(device.address);
pairButton.setIcon(device.paired ? Icon::BLUETOOTH_CONNECTED : Icon::BLUETOOTH);
connectButton.setIcon(device.connected ? Icon::LINK : Icon::LINK_OFF);