Skip to content

Commit

Permalink
Using styled button for Stream button so it outlines the button when …
Browse files Browse the repository at this point in the history
…inactive.
  • Loading branch information
dmackdev committed Oct 2, 2023
1 parent 3992cbe commit c5aa792
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pubsubman/src/ui/messages_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ impl MessagesView {
.on_disabled_hover_text("Disable Stream mode to Pull messages.");
});

let stream_mode_toggle =
ui.toggle_value(&mut self.stream_messages_enabled, "Stream");
let stream_mode_toggle = ui.add(
egui::Button::new("Stream")
.selected(self.stream_messages_enabled)
.rounding(ui.visuals().widgets.active.rounding),
);

if stream_mode_toggle.clicked() {
self.stream_messages_enabled = !self.stream_messages_enabled;

if stream_mode_toggle.changed() {
if self.stream_messages_enabled {
let cancel_token = CancellationToken::new();

Expand Down

0 comments on commit c5aa792

Please sign in to comment.