Verified Commit 57e776d1 authored by Danial Behzadi's avatar Danial Behzadi
Browse files

move progressbar to overlay

parent bde56fe2
Pipeline #545039 passed with stage
in 13 seconds
......@@ -82,6 +82,8 @@ def on_connect(*argv) -> None:
app = argv[2]
button = ui.get("SplitButton")
button.set_sensitive(False)
overlay = ui.get("ProgressOverlay")
overlay.show()
cancel_button = ui.get("CancelButton")
cancel_button.set_visible(True)
page = ui.get("MainPage")
......@@ -161,9 +163,10 @@ def set_progress(percentage: int) -> None:
set progressbar percentage
"""
bar = ui.get("ProgressBar")
fraction = float(percentage)/100
fraction = float(percentage) / 100
bar.set_fraction(fraction)
def notify(app) -> None:
"""
show notification
......@@ -229,6 +232,8 @@ def set_run_status(app=None) -> None:
set_to_stopped(app)
button = ui.get("SplitButton")
button.set_sensitive(True)
overlay = ui.get("ProgressOverlay")
overlay.hide()
def is_proxy_set() -> bool:
......
......@@ -51,8 +51,12 @@ along with Carburetor. If not, see <http://www.gnu.org/licenses/>. -->
</object>
</child>
<child>
<object class="GtkProgressBar" id="ProgressBar">
<!--<property name="css-classes">osd</property>-->
<object class="GtkOverlay" id="ProgressOverlay">
<child>
<object class="GtkProgressBar" id="ProgressBar">
<!--<property name="css-classes">osd</property>-->
</object>
</child>
</object>
</child>
<child>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment