Skip to content

Commit

Permalink
Add button
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuellar committed Jan 27, 2024
1 parent 5a5b22c commit ae8096e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from widgets.slider_zoom import SliderZoom
from widgets.mpl_plot_vertical import MplPlotVertical
from widgets.image_viewer import ImageViewer
from widgets.custom_button import CustomButton
from utils import open_data
from data import Points, PlotPoints, PlotHorizo, Plot

Expand Down Expand Up @@ -76,10 +77,11 @@ def __init__(self): # pylint: disable=R0915
self.canvas_plot_left_slider = SliderZoom(horizontal=False)
self.canvas_plot_bottom_slider = SliderZoom(horizontal=True)
self.canvas_plot_bottom_slider.setMaximumHeight(40)
canvas_plot_null = QWidget()
canvas_plot_cut_button = CustomButton("fa5s.cut")
canvas_plot_cut_button.setObjectName("cut_button")
canvas_plot_grid_layout.addWidget(self.canvas_plot_left_slider, 0, 0, 1, 1)
canvas_plot_grid_layout.addWidget(self.canvas_plot_bottom_slider, 1, 1, 1, 1)
canvas_plot_grid_layout.addWidget(canvas_plot_null, 1, 0, 1, 1)
canvas_plot_grid_layout.addWidget(canvas_plot_cut_button, 1, 0, 1, 1)
canvas_plot_grid_layout.addWidget(self.canvas_plot, 0, 1, 1, 1)
self.tabs.addTab(self.canvas_plot_grid, "Matplotlib")
self.tabs.tabBar().setTabButton(0, QTabBar.RightSide, None)
Expand Down
7 changes: 7 additions & 0 deletions ui/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ CustomButton#active {
border: 1px solid #585858;
background-color: #6e6e6e;
}

CustomButton#cut_button {
max-width: 25px;
max-height: 25px;
margin-left: 10px;
margin-bottom: 10px;
}

0 comments on commit ae8096e

Please sign in to comment.