Sha256: 3a93b3e1ac8f805e05880213e53c2979632c4e290b50258d7da53a6f38bb1576
Contents?: true
Size: 633 Bytes
Versions: 17
Compression:
Stored size: 633 Bytes
Contents
# frozen_string_literal: true require 'glimmer-dsl-libui' include Glimmer data = [ ['task 1', 0], ['task 2', 15], ['task 3', 100], ['task 4', 75], ['task 5', -1], ] window('Task Progress', 300, 200) { vertical_box { table { text_column('Task') progress_bar_column('Progress') cell_rows data # implicit data-binding } button('Mark All As Done') { stretchy false on_clicked do data.each_with_index do |row_data, row| data[row] = [row_data[0], 100] # automatically updates table due to implicit data-binding end end } } }.show
Version data entries
17 entries across 17 versions & 1 rubygems