Skip to content

Commit

Permalink
Merge branch 'wangqr_time_video' into feature
Browse files Browse the repository at this point in the history
  • Loading branch information
arch1t3cht committed Aug 1, 2022
2 parents 84d90ce + c232ef6 commit 69d79ac
Show file tree
Hide file tree
Showing 19 changed files with 1,134 additions and 0 deletions.
541 changes: 541 additions & 0 deletions CMakeLists.txt

Large diffs are not rendered by default.

Binary file added src/bitmaps/button/button_align_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bitmaps/button/button_align_24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bitmaps/button/button_align_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bitmaps/button/button_align_48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bitmaps/button/button_align_64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/bitmaps/manifest.respack
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ button/bugtracker_button_24.png
button/bugtracker_button_32.png
button/bugtracker_button_48.png
button/bugtracker_button_64.png
button/button_align_16.png
button/button_align_24.png
button/button_align_32.png
button/button_align_48.png
button/button_align_64.png
button/button_audio_commit_16.png
button/button_audio_commit_24.png
button/button_audio_commit_32.png
Expand Down
6 changes: 6 additions & 0 deletions src/colour_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ class ColourButton: public wxButton {

/// Get the currently selected color
agi::Color GetColor() { return colour; }

void SetColor(agi::Color color)
{
colour = color;
UpdateBitmap();
}
};

struct ColorValidator final : public wxValidator {
Expand Down
13 changes: 13 additions & 0 deletions src/command/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,18 @@ struct time_snap_scene final : public validate_video_loaded {
}
};

struct time_align_subtitle_to_point final : public validate_video_loaded {
CMD_NAME("time/align")
CMD_ICON(button_align)
STR_MENU("Align subtitle to video")
STR_DISP("Align subtitle to video")
STR_HELP("Align subtitle to video by key points")
void operator()(agi::Context* c) override {
c->videoController->Stop();
ShowAlignToVideoDialog(c);
}
};

struct time_add_lead_both final : public Command {
CMD_NAME("time/lead/both")
STR_MENU("Add lead in and out")
Expand Down Expand Up @@ -393,6 +405,7 @@ namespace cmd {
reg(agi::make_unique<time_snap_end_video>());
reg(agi::make_unique<time_snap_scene>());
reg(agi::make_unique<time_snap_start_video>());
reg(agi::make_unique<time_align_subtitle_to_point>());
reg(agi::make_unique<time_start_decrease>());
reg(agi::make_unique<time_start_increase>());
}
Expand Down
Loading

0 comments on commit 69d79ac

Please sign in to comment.