mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Ladybird/Qt: Display an audio button on tabs that are playing audio
When audio begins playing, add a button to the left of the favicon with a speaker icon to indicate which tab is playing audio. This button is currently disabled, but in the future may be used to mute the tab.
This commit is contained in:
committed by
Andreas Kling
parent
8503bcb897
commit
18821d3509
@@ -389,6 +389,10 @@ Tab::Tab(BrowserWindow* window, WebContentOptions const& web_content_options, St
|
||||
clipboard->setMimeData(mime_data);
|
||||
};
|
||||
|
||||
view().on_audio_play_state_changed = [this](auto play_state) {
|
||||
emit audio_play_state_changed(tab_index(), play_state);
|
||||
};
|
||||
|
||||
auto* search_selected_text_action = new QAction("&Search for <query>", this);
|
||||
search_selected_text_action->setIcon(load_icon_from_uri("resource://icons/16x16/find.png"sv));
|
||||
QObject::connect(search_selected_text_action, &QAction::triggered, this, [this]() {
|
||||
|
||||
Reference in New Issue
Block a user