Commit 5d7a9450 authored by Meg Ford's avatar Meg Ford

style fixes

parent f2ddd8bb
......@@ -32,11 +32,8 @@
.header .button {
color: rgba(255,255,255,1.0);
background-color: rgba(204,0,0,0.75);
background-image: none;
border: none;
}
.play .background {
background-color: rgba(255, 255, 255, 1.0);
}
......@@ -455,7 +455,7 @@ const MainView = new Lang.Class({
this.waveFormGrid = new Gtk.Grid({ orientation: Gtk.Orientation.VERTICAL,
height_request: 45,
width_request: 350,
width_request: 380,
valign: Gtk.Align.FILL,
name: "WaveFormGrid" });
this.waveFormGrid.set_no_show_all(true);
......@@ -768,80 +768,6 @@ const RecordButton = new Lang.Class({
}
});
const PlayPauseButton = new Lang.Class({
Name: "PlayPauseButton",
//Extends: Gtk.Button,
_init: function() {
this.parent();
this.playImage = Gtk.Image.new_from_icon_name('media-playback-start-symbolic', Gtk.IconSize.BUTTON);
this.set_image(this.playImage);
},
onPlayPauseToggled: function(listRow, selFile) {
//this.playImage.destroy();
this.pauseImage = Gtk.Image.new_from_icon_name('media-playback-pause-symbolic', Gtk.IconSize.BUTTON);
this.show();
this.activeState = play.getPipeStates();
setVisibleID = ActiveArea.PLAY;
log(listRow);
let width = listRow.get_allocated_width();
if (this.activeState != PipelineStates.PLAYING) {
play.startPlaying();
log(this);
let rowWidget = listRow.get_child(this.widget);
log(rowWidget + "rowWidget");
rowWidget.foreach(Lang.bind(this,
function(child) {
log(child.name)
if (child.name == "PlayToolBar") {
// let childButton = child.get_nth_item(1);
log(childButton); // greatgrandchild.set_image(this.pauseImage);
//}));
}
//}));
// }
if (child.name == "InfoToolbar" || child.name == "DeleteToolbar" ) {
child.hide();
child.sensitive = false;
}
if (child.name == "PlayLabelBox") {
child.foreach(Lang.bind(this,
function(grandchild) {
if (grandchild.name == "PlayTimeLabel") {
view.playTimeLabel = grandchild;
log(view.playTimeLabelLabel)
}
if (grandchild.name == "DividerLabel" )
grandchild.show();
}));
}
if (child.name == "WaveFormGrid") {
this.wFGrid = child;
child.sensitive = true;
}
}));
log(this.activeState);
log("activeState");
listRow.set_property("width-request", width);
if (this.activeState != PipelineStates.PAUSED) {
wave = new Waveform.WaveForm(this.wFGrid, selFile);
}
} else if (this.activeState == PipelineStates.PLAYING) {
play.pausePlaying();
}
}
});
const EncoderComboBox = new Lang.Class({
Name: "EncoderComboBox",
Extends: Gtk.ComboBoxText,
......
......@@ -67,7 +67,7 @@ const WaveForm = new Lang.Class({
let drawingWidth = 0;
let drawingHeight = 0;
this.drawing = Gtk.DrawingArea.new({ height_request: 45,
width_request: 350,
width_request: 380,
valign: Gtk.Align.FILL });
if (this.waveType == WaveType.RECORD) {
gridWidth = MainWindow.groupGrid.get_allocated_width();
......@@ -76,13 +76,12 @@ const WaveForm = new Lang.Class({
this.drawing.set_size_request(drawingWidth, 36);
this._grid.attach(this.drawing, 2, 0, 3, 2);
} else {
this.drawing.set_size_request(350, 36);
this.drawing.set_size_request(380, 36);
this._grid.add(this.drawing);
}
this.drawing.connect("draw", Lang.bind(this, this.fillSurface));
this.drawing.show_all();
this.drawing.get_style_context().add_class('background');
this._grid.show_all();
if (this.waveType == WaveType.PLAY) {
......@@ -194,12 +193,19 @@ const WaveForm = new Lang.Class({
log(waveheight);
let length = this.nSamples;
let pixelsPerSample = width/waveSamples;
log("WAVE" + this.waveType)
let gradient = new Cairo.LinearGradient(0, 0, width , waveheight);
gradient.addColorStopRGBA(0.75, 0.0, 0.72, 0.64, 0.35);
gradient.addColorStopRGBA(0.0, 0.2, 0.54, 0.47, 0.22);
cr.setLineWidth(1);
cr.setSourceRGBA(0.0, 185, 161, 255);
if (this.waveType == WaveType.PLAY) {
gradient.addColorStopRGBA(0.75, 0.94, 1.0, 0.94, 0.75);
gradient.addColorStopRGBA(0.0, 0.94, 1.0, 0.94, 0.22);
cr.setLineWidth(1);
cr.setSourceRGBA(0.0, 255, 255, 255);
} else {
gradient.addColorStopRGBA(0.75, 0.0, 0.72, 0.64, 0.35);
gradient.addColorStopRGBA(0.0, 0.2, 0.54, 0.47, 0.22);
cr.setLineWidth(1);
cr.setSourceRGBA(0.0, 185, 161, 255);
}
for(i = start; i <= end; i++) {
......
Markdown is supported
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