samples/hello/hello_menu_bar.rb in glimmer-dsl-tk-0.0.41 vs samples/hello/hello_menu_bar.rb in glimmer-dsl-tk-0.0.42

- old
+ new

@@ -23,11 +23,11 @@ include Glimmer COLORS = [:white, :red, :yellow, :green, :blue, :magenta, :gray, :black] -Tk::Tile::Style.theme_use "classic" # this enables setting background on label just for demo purposes +Tk::Tile::Style.theme_use 'classic' if OS.mac? # this enables setting background on label just for demo purposes root { |r| title 'Hello, Menu Bar!' @label = label { @@ -63,15 +63,10 @@ end } } end - # Windows-specific system menu (to the top-left of the window frame) - if OS.windows? - menu(label: 'System') - end - menu(label: 'File', underline: 0) { menu_item(label: 'New', underline: 0) { accelerator OS.mac? ? 'Command+N' : 'Control+N' on('command') do @@ -164,20 +159,20 @@ image File.expand_path("images/#{image_name}.png", __dir__) } end } - menu(label: 'Country', underline: 3) { + menu(label: 'Country', underline: 0) { ['denmark', 'finland', 'france', 'germany', 'italy', 'mexico', 'netherlands', 'norway', 'usa'].each do |image_name| menu_item(:radiobutton, label: image_name.capitalize) { selection image_name == 'usa' image File.expand_path("images/#{image_name}.png", __dir__) compound 'left' } end } - menu(label: 'Format', underline: 0) { + menu(label: 'Format', underline: 3) { menu(label: 'Background Color', underline: 0) { COLORS.each { |color_style| menu_item(:radiobutton, label: color_style.to_s.split('_').map(&:capitalize).join(' ')) { on('command') do @label.background = color_style