Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to Cosmic Dusk Theme #5671

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/themes/cosmic/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ def __init__(self, app):
color: rgba(145, 195, 255, 0.4);
}

QTabWidget#exportTabs QTabBar::tab,
QTabWidget#tabCategories QTabBar::tab {
margin-bottom: 10px;
}

QTabBar::tab:selected {
color: rgba(145, 195, 255, 1.0);
}
Expand Down Expand Up @@ -343,6 +348,7 @@ def __init__(self, app):
padding: 6px;
padding-left: 8px;
padding-right: 8px;
combobox-popup: 0;
}

QComboBox::drop-down {
Expand Down Expand Up @@ -416,6 +422,7 @@ def __init__(self, app):

QToolBox::tab {
color: #91C3FF;
border-top: 1px solid rgba(145, 195, 255, .2);
}

QTabWidget QWidget#pageAdvancedOptions, QWidget#pageProfile, QWidget#pageImageSequenceSettings, QWidget#pageVideoSettings, QWidget#pageAudioSettings {
Expand Down
8 changes: 8 additions & 0 deletions src/themes/humanity/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def __init__(self, app):
height: 24px;
}

QComboBox {
combobox-popup: 0;
}

.property_value {
foreground-color: #217dd4;
background-color: #565656;
Expand Down Expand Up @@ -99,6 +103,10 @@ def __init__(self, app):
QWidget#videoPreview {
background-color: #dedede;
}

QComboBox {
combobox-popup: 0;
}
"""

def apply_theme(self):
Expand Down
6 changes: 0 additions & 6 deletions src/windows/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,6 @@ def __init__(self, *args, **kwargs):
# This exception occurs when there's a problem parsing the Profile file - display a message and continue
log.error("Failed to parse file '%s' as a profile: %s" % (profile_path, e))

# Loop through sorted profiles
for profile_name in sorted(self.profile_names):
# Add to dropdown
self.cboProfile.addItem(self.getProfileName(self.getProfilePath(profile_name)),
self.getProfilePath(profile_name))

# ********* Simple Project Type **********
# load the simple project type dropdown
presets = []
Expand Down
4 changes: 2 additions & 2 deletions src/windows/ui/export.ui
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</layout>
</item>
<item row="1" column="0">
<widget class="QTabWidget" name="tabWidget">
<widget class="QTabWidget" name="exportTabs">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
Expand Down Expand Up @@ -1064,7 +1064,7 @@
<tabstop>txtFileName</tabstop>
<tabstop>txtExportFolder</tabstop>
<tabstop>btnBrowse</tabstop>
<tabstop>tabWidget</tabstop>
<tabstop>exportTabs</tabstop>
<tabstop>cboSimpleProjectType</tabstop>
<tabstop>cboSimpleTarget</tabstop>
<tabstop>cboSimpleVideoProfile</tabstop>
Expand Down
17 changes: 17 additions & 0 deletions src/windows/views/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2003,6 +2003,7 @@ def Slice_Triggered(self, action, clip_ids, trans_ids, playhead_position=0, ripp

# Emit signal to ignore updates (start ignoring updates)
get_app().window.IgnoreUpdates.emit(True)
new_starting_frame = -1

try:
# Get the nearest starting frame position to the playhead (snap to frame boundaries)
Expand Down Expand Up @@ -2040,6 +2041,9 @@ def Slice_Triggered(self, action, clip_ids, trans_ids, playhead_position=0, ripp
clip.data["position"] = original_position # Move right side back to original position
self.ripple_delete_gap(playhead_position, clip.data["layer"], removed_duration)

# Seek to new starting frame
new_starting_frame = original_position * (fps_num / fps_den) + 1

elif action == MenuSlice.KEEP_BOTH:
# Update clip data for the left clip
clip.data["end"] = start_of_clip + (playhead_position - original_position)
Expand Down Expand Up @@ -2093,6 +2097,9 @@ def Slice_Triggered(self, action, clip_ids, trans_ids, playhead_position=0, ripp
trans.data["position"] = original_position
self.ripple_delete_gap(playhead_position, trans.data["layer"], removed_duration)

# Seek to new starting frame
new_starting_frame = original_position * (fps_num / fps_den) + 1

elif action == MenuSlice.KEEP_BOTH:
# Update data for the left transition
trans.data["end"] = start_of_tran + (playhead_position - original_position)
Expand All @@ -2119,6 +2126,10 @@ def Slice_Triggered(self, action, clip_ids, trans_ids, playhead_position=0, ripp
# Emit signal to resume updates (stop ignoring updates)
get_app().window.IgnoreUpdates.emit(False)

if new_starting_frame != -1:
# Seek to new position (if needed)
self.window.SeekSignal.emit(round(new_starting_frame))

def ripple_delete_gap(self, ripple_start, layer, ripple_gap):
"""Remove the ripple gap and adjust subsequent items"""
# Get all clips and transitions right of ripple_start in the given layer
Expand Down Expand Up @@ -2882,6 +2893,9 @@ def SeekToKeyframe(self, frame_number):
# Seek to frame
self.window.SeekSignal.emit(frame_number)

# Display properties (if not visible)
self.window.actionProperties.trigger()

@pyqtSlot(int)
def PlayheadMoved(self, position_frames):

Expand Down Expand Up @@ -2933,6 +2947,9 @@ def SetPlayheadFollow(self, enable_follow):
def addSelection(self, item_id, item_type, clear_existing=False):
""" Add the selected item to the current selection """
self.window.SelectionAdded.emit(item_id, item_type, clear_existing)
if item_id and item_type == "effect":
# Display properties for effect (if not visible)
self.window.actionProperties.trigger()

def addRippleSelection(self, item_id, item_type):
if item_type == "clip":
Expand Down
Loading