Sha256: a0c302c21cd6198b5247a4baf79c59261f8e95b1ddcd6e4b5342b35470498497

Contents?: true

Size: 1.22 KB

Versions: 6

Compression:

Stored size: 1.22 KB

Contents

Shoes.app do
 stack do
    para "Icon setting tests"
    st = Shoes.settings
    default = st.icon_path
    para "Settings path is #{st.icon_path} "
    button "Show Default icon" do
      @pnl.clear do
        image "#{DIR}/#{st.icon_path}"
      end
    end
    para "Must be relative to #{DIR}"
    flow do
      button "Set default" do
        fp = ask_open_file
        str = fp[DIR.length+1..-1]
        @el1.text = str
      end
      @el1 = edit_line
      button "Test" do
        @pnl.clear do
          image "#{DIR}/#{@el1.text}"
        end
        st.icon_path = @el1.text
        window do
          para "What icon did you expect?"
        end
      end
      button "restore" do
        st.icon_path = default
        @pnl.clear do
          image "#{DIR}/#{st.icon_path}"
        end
      end
    end
    para "app.window_set_icon_path - try ABS path"
    flow do
      @el2 = edit_line
      button "select" do
        fp = ask_open_file
        @el2.text = fp
      end
      button "test" do
        @pnl.clear do
          image @el2.text
        end
        app.set_window_icon_path @el2.text
        window do
          para "Is that the icon you expected"
        end
       end
    end
  end 
  @pnl = stack do
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
scarpe-0.4.0 examples/legacy/not_checked/shoes3-tests/gapp/icon.rb
scarpe-0.3.0 examples/legacy/not_checked/shoes3-tests/gapp/icon.rb
scarpe-0.2.2 examples/legacy/not_checked/shoes3-tests/gapp/icon.rb
lacci-0.2.1 examples/legacy/not_checked/shoes3-tests/gapp/icon.rb
scarpe-0.2.1 examples/legacy/not_checked/shoes3-tests/gapp/icon.rb
scarpe-0.2.0 examples/legacy/not_checked/shoes3-tests/gapp/icon.rb