"Drag audio file" disappears when width < 266
-
The text "Drag audio file or right click to open browser" from the AudioWaveform component
disappears when width is smaller than 266.Even if I make the text smaller using LAF "drawThumbnailText", the text disappears anyway.
-
@bendurso Im using some items from the Custom Sample Import demo in a project. When I change the size to less than 266, it just cuts off the text and adds "..." to the end. Im not seeing the disappear issue youre speaking about.
Are you using the AudioWaveform with the sampler as well?
-
@trillbilly Yes, AudioWaveform connected to AudioLoopPlayer.
HiseSnippet 975.3oc4W0siaSDEdlMwExxOhBEItzWvEakpPIPofDWf2eRPQrYaz5kB2Ul09j3Q63YrFONsQHdG3QpOB7nva.bF+Sr8Vusg.au.xEQYNy4X+Mmy246LYtVE.ooJMgN3h0I.g9tN9qklniiXbIY5ID566LikZ.sagoiVmvRSgPBk166rFnC5Sx+7Ge6QLASF.0lHjmn3Avo7Xto15buumKDSXgvE73Fd+PuoAJ4wJgJCwSOmgjDVvUrkvYLqa64Pn2YbH2nz9FlARIz9GoBW6Godlrv+mvS4WJ.6hQDe7AUXdhRDZQr82jii3hv4Um6TBg5LuNKzqHKbOmY7P9F60YiOHeC25HZlOn60Fd8ZAuQ2D75.RzFPpeAjtqieflmXp2whm2wYpDKNKXXZuITJ7kPegywJzAo4yhYWASz3hMAbviFN7At3W2+aVjICLbkzUIOSYfGKO396+K6OX+ece2qu0hEctm80nUBAn6baakV+pB7.YV7kf9AtqXhLXii3wucN8NaWNMn3T2vQkbpjadbBTttlTLpiJ.oLsYqEkHDe2l7JwGWVINLKjq9Q1JXgRGS3gV1QKaiH4Gll8CgLCKmJqYxk.dnzXQxgZ2J2xXYX0ZxOL8Dq2kH.ACBvDPa317.8DXE1ZUvMF3bBjdkQkj6abhRZgN8s9ai2muAqdJu00K9YujpjyzPa6QdbtmpTItyEr0fdD4Y7PSzlP9sDuHfuLptu+EW5QdYZM1PoByDLS6tLqzR4FHMoE01xekoby5lROWu0q+MSSF1oxPmjfsDt20YN2DD0Md2qC7h0zaa7VJj8dNiWr.BL0fsuyje5UpZ8uNT9nJnjSZrbFnP7pSZzMOf4221ALIa8.FbVW.V1flTo7Z4EZbzCWtr4qxBywRFlKBaZ9bkxXUFaNfymEmHJZuwGeKugUfNs8SXBWTOiK1djKT.hYOu5mB7c2RsPjClMhEzdacQroLY61rF92wLo92ViIei1q9OWZo21A2WyT8AUXzmaoJikq.A1XjiwODkyWvxDlJqs6JlojpjHkjGzlXYz7kKAcSr24A5PiAI20Vtm24f.XoMXvep2obIvzWu23V8FNcVu9DmB35Zakc+uwHgd++bjv4pLCJoNigDUqv1YYw9nRb.fHQJAQpULaO6cuJVOrRbyGjg4K9S7S4lirqokaNpZy2HuiXVfV8zfhaEZ4xuctE7bKyEwGf+iIbsaGW+KFUEeZPP6G0KE3muqA9E6ZfObWC7K20.eztF3WsqA90u9.sCsNLynhKZYIjYyGmeGbJcyfeZOxegzifv5
-
@Christoph-Hart Is there something that makes the text disappear if width is less than 266?
-
@bendurso said in "Drag audio file" disappears when width < 266:
Is there something that makes the text disappear if width is less than 266?
Yes
-
@d-healey Great, I just removed the condition:
if (getWidth() > (w + 10) && (connectedBuffer == nullptr || connectedBuffer->getBuffer().getNumSamples() == 0))
to
if (connectedBuffer == nullptr || connectedBuffer->getBuffer().getNumSamples() == 0)
And it worked.
I think the original code only takes as reference a specific font/size to display the text or not. And that's why even though I reduced the LAF font, the text did not appear.