fix timer
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user