@@ -459,6 +459,9 @@ fn build_gtk_scale(bargs: &mut BuilderArgs) -> Result<gtk::Scale> {
459
459
// @prop draw-value - draw the value of the property
460
460
prop( draw_value: as_bool = false ) { gtk_widget. set_draw_value( draw_value) } ,
461
461
462
+ // @prop value-pos - position of the drawn value. possible values: $position
463
+ prop( value_pos: as_string) { gtk_widget. set_value_pos( parse_position_type( & value_pos) ?) } ,
464
+
462
465
// @prop round-digits - Sets the number of decimals to round the value to when it changes
463
466
prop( round_digits: as_i32 = 0 ) { gtk_widget. set_round_digits( round_digits) }
464
467
@@ -1381,6 +1384,16 @@ fn parse_justification(j: &str) -> Result<gtk::Justification> {
1381
1384
}
1382
1385
}
1383
1386
1387
+ /// @var position - "left", "right", "top", "bottom"
1388
+ fn parse_position_type ( g : & str ) -> Result < gtk:: PositionType > {
1389
+ enum_parse ! { "position" , g,
1390
+ "left" => gtk:: PositionType :: Left ,
1391
+ "right" => gtk:: PositionType :: Right ,
1392
+ "top" => gtk:: PositionType :: Top ,
1393
+ "bottom" => gtk:: PositionType :: Bottom ,
1394
+ }
1395
+ }
1396
+
1384
1397
/// @var gravity - "south", "east", "west", "north", "auto"
1385
1398
fn parse_gravity ( g : & str ) -> Result < gtk:: pango:: Gravity > {
1386
1399
enum_parse ! { "gravity" , g,
0 commit comments