1
1
use crate :: clients:: volume:: { self , Event } ;
2
2
use crate :: config:: CommonConfig ;
3
- use crate :: gtk_helpers:: IronbarGtkExt ;
3
+ use crate :: gtk_helpers:: { IronbarGtkExt , IronbarLabelExt } ;
4
4
use crate :: modules:: {
5
5
Module , ModuleInfo , ModuleParts , ModulePopup , ModuleUpdateEvent , PopupButton , WidgetContext ,
6
6
} ;
@@ -202,7 +202,13 @@ impl Module<Button> for VolumeModule {
202
202
where
203
203
<Self as Module < Button > >:: SendMessage : Clone ,
204
204
{
205
+ let button_label = Label :: builder ( )
206
+ . use_markup ( true )
207
+ . angle ( info. bar_position . get_angle ( ) )
208
+ . build ( ) ;
209
+
205
210
let button = Button :: new ( ) ;
211
+ button. add ( & button_label) ;
206
212
207
213
{
208
214
let tx = context. tx . clone ( ) ;
@@ -215,7 +221,6 @@ impl Module<Button> for VolumeModule {
215
221
{
216
222
let rx = context. subscribe ( ) ;
217
223
let icons = self . icons . clone ( ) ;
218
- let button = button. clone ( ) ;
219
224
220
225
let format = self . format . clone ( ) ;
221
226
@@ -227,7 +232,7 @@ impl Module<Button> for VolumeModule {
227
232
. replace( "{percentage}" , & sink. volume. to_string( ) )
228
233
. replace( "{name}" , & sink. description) ;
229
234
230
- button . set_label ( & label) ;
235
+ button_label . set_label_escaped ( & label) ;
231
236
} ,
232
237
_ => { }
233
238
}
0 commit comments