In a float-layout, or when having windows floating in any other layout, it is impossible to move/resize them when they're maximized. I would however like to be able to drag/resize them out of the maximized state. This doesn't seem to work:
awful.button({ modkey }, 1,
function (c)
-- I added the if-statement
if c.maximized then
c.maximized_horizontal = false
c.maximized_vertical = false
end
awful.mouse.client.move(c)
end
)
Has anyone encountered this or anything similar?
For awesome v3.5.2 this thing works:
awful.button({ modkey }, 1,
function (c)
c.maximized_horizontal = false
c.maximized_vertical = false
awful.mouse.client.move(c)
end)
I'm on awesome 3.5.6, and a similar thing works great for me:
awful.button({ modkey }, 1,
function (c)
c.maximized_horizontal = false
c.maximized_vertical = false
c.maximized = false
c.fullscreen = false
awful.mouse.client.move(c)
end)
I'm not sure if putting the maximized_horizontal/vertical rules in addition to maximized is redundant or not, but this combined with c.fullscreen works on everything, and it's quite handy =)
Related
Edit: Also happens when I swap ConstraintLayout for a Box using alignment as well...
Seems like AnimatedVisibility doesn't play well with ConstraintLayout in JP Compose at the moment.
AnimatedVisibility(
visible = entryListState.firstVisibleItemIndex > 3,
enter = fadeIn() + expandIn(expandFrom = Alignment.Center),
exit = fadeOut() + shrinkOut(shrinkTowards = Alignment.Center)
) {
ExtendedFloatingActionButton(
modifier = Modifier.constrainAs(scrollToTop) {
start.linkTo(parent.start)
bottom.linkTo(parent.bottom)
},
text = { Text(text = "TOP") },
onClick = { scope.launch { entryListState.animateScrollToItem(0) } }
)
}
The ( TOP ) fab should appear in the bottom left corner, but instead I get
When I remove the AnimatedVisibility wrapper, everything works fine. :( I know I can work around this, but I'm curious if there's something I'm doing incorrectly with the configuration of the AnimatedVisibility composable?
Turns out I was thinking about AnimatedVisibility all wrong. It's just another Composable. I needed to lift the FAB's modifiers re: positioning to the AnimatedVisibilty's modifiers.
i have a Line Chart view in my iOS app.
#IBOutlet weak var lineChartView: LineChartView!
the zooming and touching is enabled. I do not let the user do anything in the chart, even selecting is not allowed.
I tried:
self.lineChartView.pinchZoomEnabled = false
self.lineChartView.dragEnabled = false
self.lineChartView.dragDecelerationEnabled = false
but without any luck. I can still touch the graph and see the cross. I even can pinch to zoom the graph.
How can i turn this behaviour off?+
Doh!
in storyboard I can disable "User Interaction Enabled".
that do the trick.
The accepted solution didn't work for my barChartView for some reason.
Instead, setting barChartView.isUserInteractionEnabled = false did the trick.
So, for the OP, the following should work self.lineChartView.isUserInteractionEnabled = false
In case anyone would like it to still drag but only disable zooming, you can try
self.lineChart.setScaleEnabled(false)
I just used
dataSet.highlightColor = .clear
If you want to still have the interactive chart Try these:
chartView.dragXEnabled = false
chartView.dragYEnabled = false
chartView.scaleXEnabled = false
chartView.scaleYEnabled = false
I want to display a wibox in awesome when a combinaison of keys are pressed and I want that this wibox disappears after 3 seconds for example. I don't want to use naughty or popup because the wibox will have widgets inside.
I have already a solution but I don't know if this solution is a standard one or if there is another way to do this:
function taglist_wibox_show_hide(box)
local show = timer({ timeout = 0 })
show:connect_signal("timeout", function ()
print("show")
box.visible=true
show:stop() end)
show:start()
local hide = timer({ timeout = 2 })
hide:connect_signal("timeout", function ()
print("hide")
box.visible=false
hide:stop() end)
hide:start()
end
Then I add this shortcut:
awful.key({ modkey, "Control" },"y",function()
taglist_wibox_show_hide(box[mouse.screen])
end),
As far as I know there's no other way. However I think your first timer is not necessary.
function taglist_wibox_show_hide(box)
print("show")
box.visible=true
local hide = timer({ timeout = 2 })
hide:connect_signal("timeout", function ()
print("hide")
box.visible=false
hide:stop() end)
hide:start()
end
Should work just as well.
Cheers
My requirement is I want to display a Image box when a user perform a mouse over on a bar in the chart. Currently in mouse over we are displaying the text such as label, Percentage etc can we display Image as well.
Thanks
Akshay
You can use a hidden Rectangle tool to show the desired image and use the provided events to change its visibility, position, or the image loaded.
Ie, using OnMouseEnterSeries/OnMouseLeaveSeries, but the same could be done with OnMouseMove event:
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scBar
TChart1.Series(0).FillSampleValues
TChart1.Tools.Add tcMarksTip
TChart1.Tools.Add tcRectangle
TChart1.Tools.Items(1).Active = False
TChart1.Tools.Items(1).asRectangle.AllowDrag = False
TChart1.Tools.Items(1).asRectangle.AllowResize = False
TChart1.Tools.Items(1).asRectangle.Shape.Transparency = 0
End Sub
Private Sub TChart1_OnMouseEnterSeries(ByVal SeriesIndex As Long)
ValueIndex = TChart1.Series(SeriesIndex).Clicked(TChart1.MousePosition.X, TChart1.MousePosition.Y)
If ValueIndex = 2 Then
TChart1.Tools.Items(1).Active = True
TChart1.Tools.Items(1).asRectangle.Shape.Picture.LoadImage "C:\tmp\ImageForValueIndex2.png"
TChart1.Tools.Items(1).asRectangle.Left = TChart1.MousePosition.X
TChart1.Tools.Items(1).asRectangle.Top = TChart1.MousePosition.Y
End If
End Sub
Private Sub TChart1_OnMouseLeaveSeries(ByVal SeriesIndex As Long)
TChart1.Tools.Items(1).Active = False
End Sub
Edit:
As noticed in the comment below, TeeChart VCL v2014.11 introduced SystemHints property as explained here:
MarksTip tool new property SystemHints (boolean default True in VCL,
False in Firemonkey). When False, a normal TeeShape object is used to
paint the tiptool instead of using the VCL system mechanism.
ChartTool3.SystemHints := False;
ChartTool3.Format.Font.Size:=14;
The only disadvantadge compared to system hints is the shape cannot be
displayed outside the chart bounds.
When SystemHints is False, the new Format property (of type TTeeShape)
contains all the formatting properties (Brush, Pen, Font, etc) to
display the hint.
Since TeeChart ActiveX is a wrapper from TeeChart VCL, you can use this new feature from TeeChart ActiveX v2014.0.0.1.
So you just have to keep in mind to set SystemHints to False if you want to use the TeeShape properties. Here it is a simple example:
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scBar
TChart1.Series(0).FillSampleValues
TChart1.Tools.Add tcMarksTip
TChart1.Tools.Items(0).asMarksTip.Format.Picture.LoadImage "C:\tmp\ImageForAllValues.jpg"
TChart1.Tools.Items(0).asMarksTip.SystemHints = False
End Sub
I am using the pointer '+' in my code. In the legend it is displayed in black color.I want that to be displayed as legend color.
If I change the property from editting=>series=>pointer=>default- TRUE it works fine for me.
Can you let me know how this can be achieved through code.
Thanks
Akshay
I'm not 100% sure about your which is your exact question. If I understood correctly you should change pointer's pen color:
TChart1.Series(0).asLine.Pointer.Pen.Color = TChart1.Series(0).Color
A complete VB6 example:
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues 10
TChart1.Series(0).asLine.Pointer.Visible = True
TChart1.Series(0).asLine.Pointer.Style = psCross
TChart1.Series(0).asLine.Pointer.Pen.Color = TChart1.Series(0).Color
End Sub
If this doesn't help please provide more detailed information about your requirements.